Issues
Issues copied to clipboard
Variable replacement and cascaded variables are incompatible with backslashes "\" in the variable name
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:
- Create a variable with \ in the name
- Reference this variable name as the value for another variable
- Check the variable preview or reference this variable in a write-host step
Scenario 2:
- Create a variable with \ in the name
- 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