orbital-transfer / p5-Orbital-Launch

0 stars 0 forks source link

PowerShell exit only when non-interactive #5

Open zmughal opened 6 years ago

zmughal commented 6 years ago

Should use

if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }

https://www.appveyor.com/docs/build-configuration/#script-blocks-in-build-configuration, https://help.appveyor.com/discussions/problems/4498-powershell-exception-in-test_script-does-not-fail-build, https://stackoverflow.com/questions/4391553/how-to-return-an-exit-code-from-a-powershell-script-only-when-run-non-interactiv ($host.Name -eq 'ConsoleHost')