http://d.puremagic.com/issues/show_bug.cgi?id=10580
Summary: spawnShell/pipeShell changes some environment
variables (incl. PATH)
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: critical
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-07-08 22:51:17 PDT ---
----main.d:
import std.process;
import std.stdio;
void main(){
writeln(environment["PATH"]);
system("echo $PATH");
spawnShell("echo $PATH").wait;
spawnShell("echo $0").wait;
}
----
(on OSX if that matters, and I've set my shell to zsh but this isn't the
problem)
export PATH=/usr/bin
path/to/dmd -run path/to/main.d
#this prints:
/usr/bin
/usr/bin
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:... (+ other stuff)
/go/bin
/bin/zsh
The bug is that spawnShell("echo $PATH") should IMO return the same as
system("echo $PATH").
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------