mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Correct case of $LASTEXITCODE special variable
This commit is contained in:
1 parent
89e33f5772
commit
04b292ab3b
2 files changed
+2
-2
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user