Powershell and Substitution variables


I have a powershell step in a project which uses a variable called:
PSVar = “Test”

I have other variables for the project which is not used in the powershell step - called:
GeneralVar = “My project is #{OctopusPackageName}”

When running the powershell step an error occurs:

ERROR System.Exception: The variable 'GeneralVar ’ contains a reference to another variable named ‘OctopusPackageName’, which is not defined. Set the special variable OctopusPrintVariables to have Tentacle print the value of all variables to help diagnose this problem.

The problem is basically an error is generated for a variable which is not required in the powershell, but required by other steps.

How do I overcome this problem?

Hi Anton,

You can set a variable called “OctopusIgnoreMissingVariableTokens” = true
to have Octopus ignore these kinds of errors (you could even scope it to
that step). Variables that can’t be resolved will be left as-is, but that
shouldn’t matter in this case since you aren’t using that variable.


Paul Stovell
Octopus Deploy
W: octopusdeploy.com | T: @octopusdeploy http://twitter.com/octopusdeploy