diff --git a/basis/io/launcher/launcher.factor b/basis/io/launcher/launcher.factor index 06cd72b23a..79fb29b770 100755 --- a/basis/io/launcher/launcher.factor +++ b/basis/io/launcher/launcher.factor @@ -159,7 +159,7 @@ M: process-failed error. ] [ process>> . ] bi ; : wait-for-success ( process -- ) - dup wait-for-process [ drop ] [ process-failed ] if-zero ; + dup wait-for-process 0 = [ drop ] [ process-failed ] if ; : try-process ( desc -- ) run-process wait-for-success ; diff --git a/basis/io/launcher/windows/windows-tests.factor b/basis/io/launcher/windows/windows-tests.factor index 1f3c5ff264..628b783b89 100644 --- a/basis/io/launcher/windows/windows-tests.factor +++ b/basis/io/launcher/windows/windows-tests.factor @@ -2,7 +2,7 @@ USING: accessors arrays assocs calendar continuations environment eval hashtables io io.directories io.encodings.ascii io.files io.files.temp io.launcher io.launcher.windows io.pathnames kernel math namespaces parser -sequences splitting system tools.test ; +sequences splitting system tools.test combinators.short-circuit ; IN: io.launcher.windows.tests [ "hello world" ] [ { "hello" "world" } join-arguments ] unit-test @@ -230,3 +230,14 @@ IN: io.launcher.windows.tests "vocab:io/launcher/windows/test/input.txt" >>stdin try-process ] unit-test + +! Regression +[ "asdfdontexistplzplz" >process wait-for-success ] +[ + { + [ process-failed? ] + [ process>> process? ] + [ process>> command>> "asdfdontexistplzplz" = ] + [ process>> status>> f = ] + } 1&& +] must-fail-with \ No newline at end of file