diff --git a/Setup-ScriptEnv.ps1 b/Setup-ScriptEnv.ps1 index 12f0782..ca7a40b 100644 --- a/Setup-ScriptEnv.ps1 +++ b/Setup-ScriptEnv.ps1 @@ -229,8 +229,8 @@ function Invoke-ExpressionEx { ## do_sudo 'Get-Content' $tmpScriptFile.FullName '|' 'Invoke-Expression' '|' 'Export-Clixml' '-Path' $tmpOutputFile.FullName #do_sudo $sudo_cmd - if ( $tmpScriptFile ) { Remove-Item $tmpScriptFile } - if ( $tmpOutputFile ) { Import-Clixml $tmpOutputFile; Remove-Item $tmpOutputFile } + if ( $tmpScriptFile ) { Remove-Item $tmpScriptFile -Confirm:$false } + if ( $tmpOutputFile ) { Import-Clixml $tmpOutputFile; Remove-Item $tmpOutputFile -Confirm:$false } return } @@ -397,7 +397,7 @@ function _Init { git pull } elseif ( $PSCmdlet.ShouldProcess("Pull git repo from $GitURL into $MyPSScriptRoot ?") ) { $local:tmpGitDir = New-TemporaryFile - Remove-Item $tmpGitDir -Confirm:$flase -Force + Remove-Item $tmpGitDir -Confirm:$false -Force New-Item -Type Directory $tmpGitDir.FullName | Out-Null Write-Verbose "Cloning git repo [$GitURL] into temporary location ('$($tmpGitDir.FullName)')..." $local:GitOutput = "$(& git clone $GitURL $tmpGitDir.FullName --no-checkout)"