mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
$powershellpath is called as ".$powershellpath"
$powershell path is set to "C:\powershell" at line 27. This is fine, but on line 82 $powershellpath is called as ".$powershellpath\$filename". Because the path at line 27 is absolute, a period preceding the $powershellpath is not required at 82. It actually causes an error: Start-Process : This command cannot be executed due to the error: Unknown error (0x80041002). At C:\users\Nathan Sosnovske\Documents\ps2to3.ps1:81 char:14 Start-Process <<<< -FilePath ".$powershellpath\$filename" -ArgumentList /quiet CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand Removing the period on line 82 before $powershellpath fixes this error.
This commit is contained in:
parent
379e31883c
commit
f0004b1604
1 changed files with 1 additions and 1 deletions
|
@ -79,4 +79,4 @@ else
|
||||||
$FileName = $DownLoadUrl.Split('/')[-1]
|
$FileName = $DownLoadUrl.Split('/')[-1]
|
||||||
download-file $downloadurl "$powershellpath\$filename"
|
download-file $downloadurl "$powershellpath\$filename"
|
||||||
|
|
||||||
Start-Process -FilePath ".$powershellpath\$filename" -ArgumentList /quiet
|
Start-Process -FilePath "$powershellpath\$filename" -ArgumentList /quiet
|
||||||
|
|
Loading…
Reference in a new issue