We receive the below error when trying to deploy a windows service. Any solution for this?
Missing statement block after 'else' keyword.
+ else <<<< if ($status -eq "Disabled")
+ CategoryInfo : ParserError: (:) , ParentContainsErrorRecordEx
+ FullyQualifiedErrorId : MissingStatementBlockAfterElse
PowerShell script returned a non-zero exit code: 1
Tentacle version 220.127.116.11
Thanks for getting in touch!
Yeah that is a nice bug you have discovered, sorry about that.
I have created an issue in GitHub that you can track here: https://github.com/OctopusDeploy/Issues/issues/1031
We will endeavor to get this fixed asap, and let you know when the download is available.
Until they post a new release, as a work around on each tentacle you can edit the script in the error: Octopus.Features.WindowsService_BeforePostDeploy.ps1
Towards the bottom there are two places that say: else if (…
They should say: elseif (…
Easy mistake when context switching between c# and powershell.
Hi Michiel and Adam,
The fix for this is now live and available as a download:
Thanks for your patience and reporting this issue.
Thanks for the quick fix!