Correct case of $LASTEXITCODE special variable
This commit is contained in:
parent
89e33f5772
commit
04b292ab3b
|
@ -56,7 +56,7 @@ function Invoke-CronTab ([String] $user, [String[]] $arguments, [Switch] $noThro
|
|||
|
||||
Write-Verbose "Running: $crontabcmd $arguments"
|
||||
$output = & $crontabcmd @arguments 2>&1
|
||||
if ($LastExitCode -ne 0 -and -not $noThrow) {
|
||||
if ($LASTEXITCODE -ne 0 -and -not $noThrow) {
|
||||
$e = New-Object System.InvalidOperationException -ArgumentList $output.Exception.Message
|
||||
throw $e
|
||||
} else {
|
||||
|
|
|
@ -225,7 +225,7 @@ Describe 'Positive Parse Properties Tests' -Tags "CI" {
|
|||
[void] m()
|
||||
{
|
||||
$LASTEXITCODE
|
||||
$lastexitcode
|
||||
$LASTEXITCODE
|
||||
'111' -Match '1'
|
||||
$Matches
|
||||
$Matches
|
||||
|
|
Loading…
Reference in a new issue