kaocha icon indicating copy to clipboard operation
kaocha copied to clipboard

Exit codes are being reused

Open plexus opened this issue 3 years ago • 2 comments

We have two places where we throw an early-exit with exit code 252. We should never do this, an exit code should unambiguously at the code that caused it.

  • [x] check if we have any other duplicates
  • [x] make sure they are all unique
  • [ ] update the docs

plexus avatar Jul 26 '22 18:07 plexus

Looks like there's duplicates of 254, too.

Here's what I found with a quick-and-dirty ripgrep search:

src/kaocha/api.clj:84:     (throw+ {:kaocha/early-exit 254}))))
src/kaocha/plugin.clj:48:      (output/error-and-throw {:kaocha/early-exit 254} nil
src/kaocha/plugin.clj:56:        {:kaocha/early-exit 254} nil
src/kaocha/plugin.clj:68:        {:kaocha/early-exit 254} nil

src/kaocha/runner.clj:166:                                                             (throw+ {:kaocha/early-exit 252})))
src/kaocha/config.clj:31:         (throw+ {:kaocha/early-exit 252}))))
test/unit/kaocha/config_test.clj:60:    (is (= #:kaocha{:early-exit 252}

alysbrooks avatar Aug 02 '22 00:08 alysbrooks

Mostly addressed in #303. Docs just need to be wrapped up.

alysbrooks avatar Jun 20 '23 01:06 alysbrooks