[Issue 12781] New: process.d: "Executable file not found" is supposed to show executable name but fails
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed May 21 13:37:01 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12781
Issue ID: 12781
Summary: process.d: "Executable file not found" is supposed to
show executable name but fails
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: van.de.bugger at gmail.com
Look at file phobos/std/process.d line ~360, it is the very beginning of
function spawnProcessImpl:
const(char)[] name = args[0];
if (any!isDirSeparator(name))
{
if (!isExecutable(name))
throw new ProcessException(text("Not an executable
file: ", name));
}
else
{
name = searchPathFor(name);
if (name is null)
throw new ProcessException(text("Executable file not
found: ", name));
}
Look at the "else" clause. If function searchPathFor failed, we
are throwing an error "Executable file not found: ", which is
supposed to include name of executable file. But name at this
moment is null... :-(
--
More information about the Digitalmars-d-bugs
mailing list