mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 15:24:10 +02:00
Preserve working directory with -run
This commit is contained in:
parent
c25f750bd5
commit
1a4f0b1b4a
1 changed files with 4 additions and 4 deletions
|
@ -25,6 +25,7 @@ namespace BeefBuild
|
||||||
public bool mWantsGenerate = false;
|
public bool mWantsGenerate = false;
|
||||||
public bool mHandledVerb;
|
public bool mHandledVerb;
|
||||||
public String mRunArgs ~ delete _;
|
public String mRunArgs ~ delete _;
|
||||||
|
public String mStartingDirectory = new .() ~ delete _;
|
||||||
MainVerbState mMainVerbState;
|
MainVerbState mMainVerbState;
|
||||||
|
|
||||||
/*void Test()
|
/*void Test()
|
||||||
|
@ -57,6 +58,8 @@ namespace BeefBuild
|
||||||
|
|
||||||
public override void Init()
|
public override void Init()
|
||||||
{
|
{
|
||||||
|
Directory.GetCurrentDirectory(mStartingDirectory);
|
||||||
|
|
||||||
GetVersionInfo(var exeTime);
|
GetVersionInfo(var exeTime);
|
||||||
|
|
||||||
if (mVerbosity == .Default)
|
if (mVerbosity == .Default)
|
||||||
|
@ -412,9 +415,6 @@ namespace BeefBuild
|
||||||
{
|
{
|
||||||
if ((mVerb == .Run) && (!mDidRun) && (!mFailed))
|
if ((mVerb == .Run) && (!mDidRun) && (!mFailed))
|
||||||
{
|
{
|
||||||
let curPath = scope String();
|
|
||||||
Directory.GetCurrentDirectory(curPath);
|
|
||||||
|
|
||||||
let workspaceOptions = gApp.GetCurWorkspaceOptions();
|
let workspaceOptions = gApp.GetCurWorkspaceOptions();
|
||||||
let options = gApp.GetCurProjectOptions(mWorkspace.mStartupProject);
|
let options = gApp.GetCurProjectOptions(mWorkspace.mStartupProject);
|
||||||
let targetPaths = scope List<String>();
|
let targetPaths = scope List<String>();
|
||||||
|
@ -423,7 +423,7 @@ namespace BeefBuild
|
||||||
if (targetPaths.IsEmpty)
|
if (targetPaths.IsEmpty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ExecutionQueueCmd executionCmd = QueueRun(targetPaths[0], mRunArgs ?? "", curPath);
|
ExecutionQueueCmd executionCmd = QueueRun(targetPaths[0], mRunArgs ?? "", mStartingDirectory);
|
||||||
executionCmd.mRunFlags |= .NoRedirect;
|
executionCmd.mRunFlags |= .NoRedirect;
|
||||||
executionCmd.mIsTargetRun = true;
|
executionCmd.mIsTargetRun = true;
|
||||||
mDidRun = true;
|
mDidRun = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue