Skip to content

Commit ae1ce07

Browse files
committed
Set the environment's exit code in Exit-ADTInvocation for good measure.
1 parent 81ef4e2 commit ae1ce07

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/PSAppDeployToolkit/Private/Exit-ADTInvocation.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ function Private:Exit-ADTInvocation
7575

7676
# Forcibly set the LASTEXITCODE so it's available if we're breaking
7777
# or running Close-ADTSession from a PowerShell runspace, etc.
78+
[System.Environment]::ExitCode = $ExitCode
7879
$Global:LASTEXITCODE = $ExitCode
7980

8081
# If we're not to exit the shell (i.e. we're running from the command line),

0 commit comments

Comments
 (0)