From 8d8a5d4f8585d98f8fe98b1d87b3c66869f4ec60 Mon Sep 17 00:00:00 2001 From: Carrie Roberts Date: Tue, 10 Dec 2024 20:43:19 -0700 Subject: [PATCH] fix for file not found issue --- Private/Invoke-ExecuteCommand.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Private/Invoke-ExecuteCommand.ps1 b/Private/Invoke-ExecuteCommand.ps1 index 13686a6..4b6cbf7 100644 --- a/Private/Invoke-ExecuteCommand.ps1 +++ b/Private/Invoke-ExecuteCommand.ps1 @@ -53,8 +53,9 @@ function Invoke-ExecuteCommand ($finalCommand, $executor, $executionPlatform, $T # Write-Host -ForegroundColor Magenta "$execExe $arguments" if ($session) { $scriptParentPath = Split-Path $import -Parent + $publicPath = Join-Path (Split-Path $scriptParentPath -Parent) "Public" $fp = Join-Path $scriptParentPath "Invoke-Process.ps1" - $fp2 = Join-Path $scriptParentPath "Invoke-KillProcessTree.ps1" + $fp2 = Join-Path $publicPath "Invoke-KillProcessTree.ps1" invoke-command -Session $session -FilePath $fp invoke-command -Session $session -FilePath $fp2 $res = invoke-command -Session $session -ScriptBlock { Invoke-Process -filename $Using:execExe -Arguments $Using:arguments -TimeoutSeconds $Using:TimeoutSeconds -stdoutFile "art-out.txt" -stderrFile "art-err.txt" }