l3nz / cli-matic

Compact, hands-free [sub]command line parsing library for Clojure.
Eclipse Public License 2.0
363 stars 29 forks source link

[Ftr] Flag to not run System/Exit #144

Closed lgrapenthin closed 2 years ago

lgrapenthin commented 2 years ago

Is your feature request related to a problem? Please describe. I want to see what it prints, not just return value of run-cmd*

Describe the solution you'd like A flag to run-cmd or a variation of run-cmd that doesn't call System/Exit

Describe alternatives you've considered Not using this lib

lgrapenthin commented 2 years ago

Workaround

(alter-var-root #'cli-matic.platform/exit-script
                  (constantly
                   (fn [retval]
                     (println "cli-matic would shut down with" retval))))
l3nz commented 2 years ago

Describe the solution you'd like A flag to run-cmd or a variation of run-cmd that doesn't call System/Exit

I see, but why?

lgrapenthin commented 2 years ago

I want to see what it prints, not just return value of run-cmd*

Needless to add, I prefer not restarting my JVM during development.

l3nz commented 2 years ago

I think your workaround is perfect then.

lgrapenthin commented 2 years ago

Of course my workaround is perfect. Point of this ticket is to elminate its basis, which is everything but.