Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected behaviour for template containing text like #{$Foo}? #5

jasonmitchell opened this issue Feb 26, 2016 · 3 comments


Copy link

I encountered an issue when transforming a file in Octopus Deploy where a piece of text in the file in the format of #{$Foo} caused the error:

Parsing failure: unexpected '#'; expected end of input (Line 1, Column 1); recently consumed:

I am not trying to substitute this piece of text it just happens to be in file being transformed. I've added a test case as an example:

The error message for this test is the same as the other cases for the test. I wanted to clarify if this is expected behaviour or is a bug in the template parser?

If this is expected is there anyway to work around other than removing the piece of text from the file?

@zentron zentron self-assigned this Mar 2, 2016
Copy link

I've also had this same issue - surprised there's nobody else encountered this scenario!

Copy link

I also get this issue when running the DACPAC deploy community library script as below

It has the following code:

`Function Format-OctopusArgument {


$Value = $Value.Trim()

# There must be a better way to do this
Switch -Wildcard ($Value){

	"True" { Return $True }
	"False" { Return $False }
	"#{*}" { Return $null }
	Default { Return $Value }


Copy link

zentron commented Nov 30, 2016

Hi guys, this issue is because Octostache sees #{ and thinks you are asking for a variable replacement. To avoid this issue, add another # before it (e.g. "##{*}" { Return $null }) and when variable replacement takes place, Octostache will remove the extra # leaving you with the value you are after.
I have updated our docs outlining this behaviour.
I hope that helps!

@zentron zentron closed this as completed Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

4 participants