mirror of https://gitlab.com/basile.b/dexed.git
fix runnable currdir not set properly when executing or when running
This commit is contained in:
parent
e7708131db
commit
6db535128c
|
@ -3085,6 +3085,7 @@ begin
|
||||||
dmdproc.OnReadData := @asyncprocOutput;
|
dmdproc.OnReadData := @asyncprocOutput;
|
||||||
dmdproc.OnTerminate:= @asyncprocTerminate;
|
dmdproc.OnTerminate:= @asyncprocTerminate;
|
||||||
dmdproc.Options := [poUsePipes, poStderrToOutPut];
|
dmdproc.Options := [poUsePipes, poStderrToOutPut];
|
||||||
|
dmdproc.CurrentDirectory:=fDoc.fileName.extractFileDir;
|
||||||
case fRunnablesOptions.compiler of
|
case fRunnablesOptions.compiler of
|
||||||
dmd: dmdProc.Executable := fCompilerSelector.getCompilerPath(dmd);
|
dmd: dmdProc.Executable := fCompilerSelector.getCompilerPath(dmd);
|
||||||
gdc, gdmd: dmdProc.Executable := fCompilerSelector.getCompilerPath(gdmd);
|
gdc, gdmd: dmdProc.Executable := fCompilerSelector.getCompilerPath(gdmd);
|
||||||
|
@ -3228,13 +3229,13 @@ begin
|
||||||
end;
|
end;
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
try
|
try
|
||||||
fRunProc.CurrentDirectory := fRunProc.Executable.extractFileDir;
|
|
||||||
if runArgs.isNotEmpty then
|
if runArgs.isNotEmpty then
|
||||||
begin
|
begin
|
||||||
CommandToList(fSymStringExpander.expand(runArgs), lst);
|
CommandToList(fSymStringExpander.expand(runArgs), lst);
|
||||||
fRunProc.Parameters.AddStrings(lst);
|
fRunProc.Parameters.AddStrings(lst);
|
||||||
end;
|
end;
|
||||||
fRunProc.Executable := fname;
|
fRunProc.Executable := fname;
|
||||||
|
fRunProc.CurrentDirectory := fRunProc.Executable.extractFileDir;
|
||||||
if unittest and fCovModUt then
|
if unittest and fCovModUt then
|
||||||
fRunProc.OnTerminate:=@unittestDone;
|
fRunProc.OnTerminate:=@unittestDone;
|
||||||
if redirect then
|
if redirect then
|
||||||
|
|
Loading…
Reference in New Issue