Azure / Azure-DataFactory

Other
485 stars 590 forks source link

Invalid syntax on multiple lines #695

Open colt64 opened 1 month ago

colt64 commented 1 month ago

Line 522 of PrePostDeploymentScript.Ver2.ps1 contains a ternary if, which is not valid powershell syntax:

$parameterType = $null -ne $templateParameters.$($parameterName).value ? $templateParameters.$($parameterName).value.GetType().Name : $null

Line 521 contains && instead of -and and || instead of -or

if ($null -ne $templateParameters.$($parameterName) && ($PreDeployment || $parameterName.EndsWith('runtimeState'))) {

These cause errors when running in a pipeline. Easy fix but needs to be corrected. If I can find time will submit a PR but hope you get to it first.

colt64 commented 1 month ago

my mistake, the ternary operation is valid in powershell 7.0 but not all versions. For example, the one on my release server.