/test/integration/roles/test_win_script/files/test_script_with_errors.ps1

https://github.com/ajanthanm/ansible · Powershell · 9 lines · 6 code · 2 blank · 1 comment · 0 complexity · 151552517a29aa4950741cbfbc72d983 MD5 · raw file

  1. # Test script to make sure we handle non-zero exit codes.
  2. trap
  3. {
  4. Write-Error -ErrorRecord $_
  5. exit 1;
  6. }
  7. throw "Oh noes I has an error"