diff options
author | xtqqczze <45661989+xtqqczze@users.noreply.github.com> | 2020-01-13 22:15:45 +0300 |
---|---|---|
committer | xtqqczze <45661989+xtqqczze@users.noreply.github.com> | 2020-01-13 22:15:45 +0300 |
commit | 04b292ab3b5c5830b2bfc1969638e6d0a6e3c4cc (patch) | |
tree | 65f6cc434ad321d25e0764d8e528c477400225f7 /demos | |
parent | 89e33f577255543aaaf52ba192ebbb98201469c8 (diff) |
Correct case of $LASTEXITCODE special variable
Diffstat (limited to 'demos')
-rw-r--r-- | demos/crontab/CronTab/CronTab.psm1 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/crontab/CronTab/CronTab.psm1 b/demos/crontab/CronTab/CronTab.psm1 index 15fedb5207..617641518e 100644 --- a/demos/crontab/CronTab/CronTab.psm1 +++ b/demos/crontab/CronTab/CronTab.psm1 @@ -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 { |