August 21, 2013 [Issue 10863] New: [Win] executeShell() fails with spaces in cmd paths, unlike old shell() | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=10863 Summary: [Win] executeShell() fails with spaces in cmd paths, unlike old shell() Product: D Version: unspecified Platform: All OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: cbkbbejeap@mailinator.com --- Comment #0 from Nick Sabalausky <cbkbbejeap@mailinator.com> 2013-08-20 18:26:48 PDT --- On Windows: ------------------------- import std.process; import std.stdio; void main() { // Works. However, shell() is scheduled for // deprecation in favor of executeShell() writeln( shell(`"cmd with spaces.exe" --help`) ); // Fails: // '"cmd with spaces.exe' is not recognized as an internal or external command, operable program or batch file. writeln( executeShell(`"cmd with spaces.exe" --help`).output ); } ------------------------- On Linux, the equivalent code (replacing single quotes with double quotes) works fine on both shell() and executeShell(). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation