mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-03 19:53:50 -05:00
Restore 'workingdir' variable when using '-Run' Parameter with 'Compile.ps1' Script
This commit is contained in:
@ -121,7 +121,7 @@ try {
|
|||||||
Write-Progress -Activity "Validating" -Completed
|
Write-Progress -Activity "Validating" -Completed
|
||||||
|
|
||||||
if ($run) {
|
if ($run) {
|
||||||
$script = "& '$scriptname' $Arguments"
|
$script = "& '$workingdir\$scriptname' $Arguments"
|
||||||
|
|
||||||
$powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
|
$powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
|
||||||
$processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd }
|
$processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd }
|
||||||
|
Reference in New Issue
Block a user