[Issue 10580] New: spawnShell/pipeShell changes some environment variables (incl. PATH)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 8 22:51:18 PDT 2013
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: nobody at puremagic.com
ReportedBy: thelastmammoth at gmail.com
--- Comment #0 from thelastmammoth at gmail.com 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: -------
More information about the Digitalmars-d-bugs
mailing list