From 07277ac4af24a9386c25b19f55ac8068c00707e2 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Sun, 24 Apr 2016 18:09:03 -0500 Subject: [PATCH] (GH-709) Get Exit code from PowerShell Host When interacting with a PowerShell host, ensure it returns the proper exit code by calling the right method that will set it for both system powershell and the internal host. --- .../chocolatey.resources.csproj | 3 +++ .../functions/Set-PowerShellExitCode.ps1 | 23 +++++++++++++++++++ .../services/PowershellService.cs | 4 ++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 src/chocolatey.resources/helpers/functions/Set-PowerShellExitCode.ps1 diff --git a/src/chocolatey.resources/chocolatey.resources.csproj b/src/chocolatey.resources/chocolatey.resources.csproj index bc2ef12896..226eecc882 100644 --- a/src/chocolatey.resources/chocolatey.resources.csproj +++ b/src/chocolatey.resources/chocolatey.resources.csproj @@ -137,6 +137,9 @@ + + +