worxspace / PSPulumi

GNU General Public License v3.0
7 stars 1 forks source link

Exception in the script at not detected when running pulumi directly #1

Closed rdbartram closed 2 years ago

rdbartram commented 2 years ago

Ok, so after looking at this, the best way to resolve this is to do one of the following:

  1. set $ExecutionActionPreference = 'stop' at the top of your script
  2. adjust your pspulumi.yaml as follows
name: psyamlpulumi
runtime:
  name: yaml
  options:
    compiler: pwsh -noninteractive -noprofile -command "& {$ErrorActionPreference='stop'; ./powershell.ps1}"