Powershell cake script execution error

I made a cake script to deploy a squirrel.windows release.
it works well when executed directly from powershell, but fail when executed from a powershell deployment script in octopus.

In fact it is squirrel that failed since they switched the way they generate the delta package. they now use 7zip, and they launch it with a ProcessStart. Again, it works well directly from powershell, but I get a path not found exception in the squirrel logs when i execute it from octopus.

I tried to launch the script with the “&” char, Invoke-Expression and even ProcessStartInfo, and got the same result.

in attachment the squirrel log.

octopus version: 3.7.3
powershell version: 5.0.10586.117

squirrelsetup.log (4 KB)

Hi Olivier,

It feels like the issue is lack of permissions.
Does the account the Tentacle is running under has enough rights to extract the nuget to C:\Windows\system32\config\systemprofile\AppData\Local\SquirrelTemp\tempa

You can try a different account , see https://octopus.com/docs/installation/installing-tentacles#InstallingTentacles-Permissions

Also, you can try to debug the issue, see https://octopus.com/docs/guides/debugging-powershell-scripts


Thank you for the response,

Tentacle is executed with the system account. The related folder is fully accessible to this account. But it seems that you are right, it is related to permission.

I just came back to a previous version of squirrel and submitted a ticket there.

Hi Oliver,

So does it work with the previous version of Squirrel?


Yes it works with squirrel 1.6.0