Issues icon indicating copy to clipboard operation
Issues copied to clipboard

Variable replacement and cascaded variables are incompatible with backslashes "\" in the variable name

Open donnybell opened this issue 1 year ago • 1 comments

Severity

No response

Version

2023.X+

Latest Version

None

What happened?

Variable replacement and cascaded variables are incompatible with backslashes \ in the variable name. This can impact more than just the variable with \ in the name as variable replacement may stop once it encounters an affected variable name.

Reproduction

Scenario 1:

  1. Create a variable with \ in the name
  2. Reference this variable name as the value for another variable
  3. Check the variable preview or reference this variable in a write-host step

Scenario 2:

  1. Create a variable with \ in the name
  2. Reference this variable in a write-host step

Error and Stacktrace

No response

More Information

No response

Workaround

Use Octopus Parameters for variable names that contain a \ where possible: https://octopus.com/docs/deployments/custom-scripts/passing-parameters-to-scripts

donnybell avatar Jul 18 '24 20:07 donnybell