[Issue 15915] std.process.execute throws an exception when using workDir and a relative path

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Apr 12 05:53:15 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15915

--- Comment #3 from Atila Neves <atila.neves at gmail.com> ---
Then my understanding is correct; that's what I thought workDir was, the
directory where the process is started in.

However, I don't think the current implementation makes sense. There's already
an if to check if the path has directory separators in it - if workDir is not
"", I think what makes sense is to be relative to workDir.

i.e.

execute(["./foo"]); //look for ./foo
execute(["./foo"], ..., "bar"); //look for bar/foo
execute(["foo"]); //search path for foo
execute(["foo", ..., "bar"); //search path for foo

--


More information about the Digitalmars-d-bugs mailing list