Fixes working directory handling

Ensures build and cleanup processes run from the expected project location.

Prevents temporary state files from being created or removed in the wrong folder, which avoids stale markers and cleanup failures when launched from the UI or another directory.
This commit is contained in:
rbalsleyMSFT
2026-03-10 17:01:40 -07:00
parent e7589f6ceb
commit 9bacac8f3d
2 changed files with 12 additions and 8 deletions
+8 -6
View File
@@ -293,9 +293,10 @@ $script:uiState.Controls.btnRun.Add_Click({
)
$startCleanupParams = @{
FilePath = $pwshPath
ArgumentList = $cleanupArgs
PassThru = $true
FilePath = $pwshPath
ArgumentList = $cleanupArgs
WorkingDirectory = $ffuDevPath
PassThru = $true
}
if ($Host.Name -eq 'ConsoleHost') {
$startCleanupParams['NoNewWindow'] = $true
@@ -455,9 +456,10 @@ $script:uiState.Controls.btnRun.Add_Click({
}
$startBuildParams = @{
FilePath = $pwshPath
ArgumentList = $pwshArgs
PassThru = $true
FilePath = $pwshPath
ArgumentList = $pwshArgs
WorkingDirectory = $config.FFUDevelopmentPath
PassThru = $true
}
if ($Host.Name -eq 'ConsoleHost') {
$startBuildParams['NoNewWindow'] = $true