running a command in a directory using std.process

2013-10-24 Thread Benjamin Thaut
As far as I can tell std.process can only run commands in the working directory of the currently executing function. I want to execute a certain program inside a subdirectory on windows and can't get it to work: myproject |- subdir So my executable has myproject as working directory. And I

Re: running a command in a directory using std.process

2013-10-24 Thread simendsjo
On Thursday, 24 October 2013 at 06:25:40 UTC, Benjamin Thaut wrote: As far as I can tell std.process can only run commands in the working directory of the currently executing function. I want to execute a certain program inside a subdirectory on windows and can't get it to work: myproject

Re: running a command in a directory using std.process

2013-10-24 Thread Timothee Cour
+1 this is a command use case. Further,relying on shell such as cd subdir foo is fragile: if it fails, we're not sure whether it's because it couldn't cd to subdir or because of foo. Woudl the following be as efficient? system_in_dir(string dir, string action){ auto path=getcwd scope(exit)

Re: running a command in a directory using std.process

2013-10-24 Thread Benjamin Thaut
Am 24.10.2013 19:03, schrieb Timothee Cour: +1 this is a command use case. Further,relying on shell such as cd subdir foo is fragile: if it fails, we're not sure whether it's because it couldn't cd to subdir or because of foo. Woudl the following be as efficient? system_in_dir(string dir,