mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +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 mHandledVerb;
|
||||
public String mRunArgs ~ delete _;
|
||||
public String mStartingDirectory = new .() ~ delete _;
|
||||
MainVerbState mMainVerbState;
|
||||
|
||||
/*void Test()
|
||||
|
@ -57,6 +58,8 @@ namespace BeefBuild
|
|||
|
||||
public override void Init()
|
||||
{
|
||||
Directory.GetCurrentDirectory(mStartingDirectory);
|
||||
|
||||
GetVersionInfo(var exeTime);
|
||||
|
||||
if (mVerbosity == .Default)
|
||||
|
@ -412,9 +415,6 @@ namespace BeefBuild
|
|||
{
|
||||
if ((mVerb == .Run) && (!mDidRun) && (!mFailed))
|
||||
{
|
||||
let curPath = scope String();
|
||||
Directory.GetCurrentDirectory(curPath);
|
||||
|
||||
let workspaceOptions = gApp.GetCurWorkspaceOptions();
|
||||
let options = gApp.GetCurProjectOptions(mWorkspace.mStartupProject);
|
||||
let targetPaths = scope List<String>();
|
||||
|
@ -423,7 +423,7 @@ namespace BeefBuild
|
|||
if (targetPaths.IsEmpty)
|
||||
return;
|
||||
|
||||
ExecutionQueueCmd executionCmd = QueueRun(targetPaths[0], mRunArgs ?? "", curPath);
|
||||
ExecutionQueueCmd executionCmd = QueueRun(targetPaths[0], mRunArgs ?? "", mStartingDirectory);
|
||||
executionCmd.mRunFlags |= .NoRedirect;
|
||||
executionCmd.mIsTargetRun = true;
|
||||
mDidRun = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue