In my step I’m trying find the location of Octostache.dll and wanted to use $OctopusParameters[‘Octopus.Tentacle.Agent.ProgramDirectoryPath’]. The problem is this variable seems to be missing when the step runs. Is the documentation (http://docs.octopusdeploy.com/display/OD/System+variables) out of date?
I attached the output from a script run from the management console. The script was:
Log.txt (4 KB)
Thanks for getting in touch!
Looks like you’ve stumbled upon a bit of a bug, I’ve gone through the code and cannot find anywhere where we actually populate this variable.
Instead of using that particular system variable, you can use
env:TentacleExecutablePath, this is the full path to
Tentacle.exe so you would need to do a bit more work to just get the folder.
Hope that helps!
Thank you and kind regards,
Code snippet to get the parent folder of
[System.IO.DirectoryInfo]$TentacleExecutablePath = $env:TentacleExecutablePath