Hello dear community, I want to inform you about a bad error message that occurs when you call `startProcess` with a wrong `workingDir`. (I hope the category is the right one) const correct_path = "/home/user/" const wrong_path = "home/user/ #Works fine: let p = startProcess("ls", correct_path) #Gives the following error message: let p2 = startProcess("ls", wrong_path) Run
The error message is the following: ref 0x7f25edd83b90 --> [errorCode = 0, parent = nil, name = 0x560c625722e2"OSError", msg = 0x7f25ea28f060"Additional info: \"Could not find command: \\'ls\\'. OS error: No such file or directory\"", trace = 0x7f25edb4f150@[[procname = 0x560c6259d322"foo", line = 50, filename = 0x560c6259d1c8"/home/container/foo.nim"], [procname = 0x560c6259d1c0"main", line = 45, filename = 0x560c6259c1c0"/home/container/foo.nim"], [procname = 0x560c6259be9a"startProcess", line = 1016, filename = 0x560c6259bd58"/home/container/.choosenim/toolchains/nim-1.4.8/lib/pure/osproc.nim"], [procname = 0x560c6259be86"startProcessAuxFork", line = 1126, filename = 0x560c6259bd58"/home/container/.choosenim/toolchains/nim-1.4.8/lib/pure/osproc.nim"], [procname = 0x560c625722ea"raiseOSError", line = 94, filename = 0x560c62572288"/home/container/.choosenim/toolchains/nim-1.4.8/lib/pure/includes/oserr.nim"]], up = nil] Run `Could not find command: \'ls\'` is very misleading and it took me a couple of hours to debug until I coincidentally found out that it works without the `workingDir`. So maybe there should be a more precise error message with parameter checking. Greetings, Christian