@dmiller It appears that this fix regressed somewhere between alpha5 and alpha6
@dorandraco The source hasn't changed in the two places where the change was made. Not sure why you are seeing a change.
I don't know either 🤷 But I ran a trivially failing test (`(is false)` or something like that) on alphas 4, 5, and 6, and only on 6 I got an exit code of 0.
Okay, that gives me a little more context. Are you on Windows or Linux?
Windows 11
If it ever worked, I am surprised.
Here's what I discovered. If I call clojure.main and force an exit code, I see the exit code.
S C:\work\temp\testretcode> clojure.main
Clojure core loaded in 365 milliseconds.
Clojure 1.12.1-alpha1
user=> (Environment/Exit 99)
PS C:\work\temp\testretcode> $LASTEXITCODE
99
If I call cljr to run the REPL and force an exit code, we just see 0 as the exit code.
PS C:\work\temp\testretcode> cljr
Clojure core loaded in 368 milliseconds.
Clojure 1.12.1-alpha1
user=> (Environment/Exit 99)
PS C:\work\temp\testretcode> $LASTEXITCODE
0
The problem is that I'm not a good Powershell coder. The script wasn't returning the exit code from the embedded call to clojure.main.
I've coded a fix for that. However, I'm invoking the Powershell script via System.Diagnostics.Process and for whatever reason, I can only exit code of 1 or 0, nothing more specific.
So, I can get a version out that at least has 0/1 (success/fail) semantics.
If you need the specific error return code, well, I'm still working on that.
( I have no idea why it won't pass the specific code through. I can't find any information on the problem.)> The problem is that I'm not a good Powershell coder. Something the entire Clojure community struggles with laughcry My use case was simply running tests, so zero vs nonzero is the only distinction I need. Mine is also just a hobby project, so no pressure from me for a fix. I figured reporting the issue might benefit others, though, who may rely on this for, e.g., CI.
Sigh. On it.
😅 sorry