Revert "Fixed an issue where errorCode was always 0 when startProcess did…" (#23995)

Reverts nim-lang/Nim#23992
This commit is contained in:
ringabout
2024-08-21 20:53:38 +08:00
committed by GitHub
parent 12b90d7c07
commit 832ba815d1
2 changed files with 4 additions and 25 deletions

View File

@@ -1,18 +0,0 @@
discard """
output: '''true
true'''
"""
import std/osproc
const command = "lsaaa -lah"
try:
let process = startProcess(command, options = {poUsePath})
discard process.waitForExit()
except OSError as e:
echo e.errorCode != 0
let process = startProcess(command, options = {poUsePath, poEvalCommand})
let exitCode = process.waitForExit()
echo exitCode != 0