Skip to content

Commit 50caf12

Browse files
committed
FIX: returning same status code across all systems
related to: Oldes/Rebol-issues#2215 resolves: Oldes/Rebol-issues#2470
1 parent 61cf0ac commit 50caf12

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/os/host-main.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ int main(int argc, char **argv) {
346346
)
347347
){
348348
if (n < 0 && !(Main_Args.options & RO_HALT)) {
349-
RL_Do_String(b_cast("unless system/options/quiet [print {^[[mClosing in 3s!} wait 3] quit/return -1"), 0, 0);
349+
RL_Do_String(b_cast("unless system/options/quiet [print {^[[mClosing in 3s!} wait 3]"), 0, 0);
350+
OS_Exit(-n);
350351
}
351352
Host_Repl();
352353
}

src/tests/units/call-test.r3

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ rebol-cmd: func[cmd][
8585

8686
--test-- "Error printed to stderr"
8787
;@@ https://github.com/Oldes/Rebol-issues/issues/1862
88-
--assert 0 <> rebol-cmd {--do "prin 1 1 / 0"} ; returned number is not same across all systems!
89-
--assert "1" = out-buffer
88+
--assert 1 = rebol-cmd {--do "prin 2 1 / 0"}
89+
--assert "2" = out-buffer
9090
--assert not none? find err-buffer "Math error"
9191

9292

0 commit comments

Comments
 (0)