Azure / Azure-DataFactory

Other
481 stars 586 forks source link

Script Failing - Unexpected token '?' in expression or statement. #519

Closed cboneill0099 closed 1 year ago

cboneill0099 commented 1 year ago

It looks like the Update-TriggerTemplate function was updated and now the script will not run. I am getting the following error thrown by line 470

##[error]At x:\ArmTemplates\PrePostDeploymentScript.ps1:470 char:74
+ ... parameterType = $templateParameters.$($parameterName).value ? $templa ...
+                                                                 ~
Unexpected token '?' in expression or statement.
##[error]PowerShell exited with code '1'.

Code causing issue $parameterType = $templateParameters.$($parameterName).value ? $templateParameters.$($parameterName).value.GetType().Name : $null

Trying to find a way around this is we currently cannot run any of our releases

cboneill0099 commented 1 year ago

Enabling powershell core fixed this. Would have been nice if a breaking change was communicated better.