digitalmars.D.bugs - [Issue 10863] New: [Win] executeShell() fails with spaces in cmd paths, unlike old shell()
- d-bugmail puremagic.com (34/34) Aug 20 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10863
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 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: -------
Aug 20 2013