Skip to content

Commit

Permalink
feat: continue work on exec command
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 1d7617e45fcfe3873d206959c3e897a10642238a22c720bfd1018b2a6ae0ce76
  • Loading branch information
thindil committed Dec 29, 2023
1 parent 79a482c commit 1a47966
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/commands.nim
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,11 @@ proc executeCommand*(commands: ref Table[string, CommandData];
commProcess = startProcess(command = commandName, args = (
if arguments.len > 0: initOptParser(
cmdline = $arguments).remainingArgs else: @[]), options = {
poStdErrToStdOut, poUsePath})
for line in commProcess.lines:
showOutput(message = line, db = db)
poStdErrToStdOut, poUsePath, poParentStreams})
result = commProcess.waitForExit.ResultCode
commProcess.close
except:
discard
return showError(message = "Can't execute the command '" &
commandToExecute & "'. Reason: ", e = getCurrentException(), db = db)
except CapacityError:
return QuitFailure.ResultCode

0 comments on commit 1a47966

Please sign in to comment.