Powershell script problem 3.0

Hi,

First of, I would like to say thank you for this great software. I just upgraded my octopus environment to pre-release 3.0.

After the upgrade i started to experience problems with many of my powershell scripts. If i run them local on the servers everything seems to be okey. But if i use deploy or script console the scripts will not work.

The error tell me that i’am missing " and } in my scripts, same error on more that one script. But in reality they are all there. Have anyone encountered this with 3.0?

The string is missing the terminator: ".
Error 11:22:17
At C:\Octopus\Work\20150626092208-97\Script.ps1:5 char:3
Error 11:22:17

  • {
    Error 11:22:17
  • ~
    Error 11:22:17
    Missing closing ‘}’ in statement block.
    Error 11:22:17
    • CategoryInfo : ParserError: (:slight_smile: [], ParentContainsErrorRecordEx
      Error 11:22:17
      ception
      Error 11:22:17
    • FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

Hi Viktor,

Thanks for getting in touch! Were those exact same scripts working on Octopus 2.X? If they were working, please drop by http://community.octopusdeploy.com/ and post this issue there. We are using that forum specifically for all things 3.0 related. If this is a problem that seems to be breaking scripts only on 3.0, then it’ll really help us if you could post that issue there, as the devs that are working on 3.0 are checking that forum on a daily basis.

If possible, also add a (small) script to help reproducing this issue.

Best regards,

Dalmiro

I’ve posted in the 3.0 forums, but I just wanted to pop by here and say that I’ve been seeing a similar issue with my Script Modules.

Hi,

I’m sorry for my late answer. I ended up rewriting the sections that cause problems. Also started to use step templates instead of script step. I no longer see these kinds of errors.

@Jamie, That is great!

Jamie - If that’s actually broken on 3.0, then its something we definitely have to fix. Thanks for letting the devs know on the 3.0 forum!

Viktor - Glad to hear you found a workaround. Step Templates are actually better than Script Steps if its something you’re gonna be using often and in more than one project.

Dalmiro