mirror of
https://github.com/inspec/inspec
synced 2024-11-26 14:40:26 +00:00
Get stricter about error handling in powershell.
Still doesn't do anything about subcmds failing. Those have to be manually checked. Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
b557eaff7e
commit
3c9c2b4b1f
2 changed files with 8 additions and 0 deletions
3
.expeditor/buildkite/artifact.habitat.test.ps1
Normal file → Executable file
3
.expeditor/buildkite/artifact.habitat.test.ps1
Normal file → Executable file
|
@ -1,6 +1,9 @@
|
|||
#!/usr/bin/env powershell
|
||||
|
||||
#Requires -Version 5
|
||||
# https://stackoverflow.com/questions/9948517
|
||||
Set-StrictMode -Version Latest
|
||||
$PSDefaultParameterValues['*:ErrorAction']='Stop'
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$env:HAB_ORIGIN = 'ci'
|
||||
$env:CHEF_LICENSE = 'accept-no-persist'
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
# https://stackoverflow.com/questions/9948517
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = "Stop"
|
||||
$PSDefaultParameterValues['*:ErrorAction']='Stop'
|
||||
|
||||
$pkg_name="inspec"
|
||||
$pkg_origin="chef"
|
||||
$pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION")
|
||||
|
|
Loading…
Reference in a new issue