Bamboo: how do I pass a value with a spaces on a command line script in Bamboo 3.2?

Chris Gill September 12, 2011

We are currently live with Bamboo 2.7.3 and everything is running fine. We have a custom command line tool for Windows that preps our code before the release, pulling in the right version of various mercurial repositories

I am currently checking that everything works as expected in Bamboo 3.2 before we upgrade. It all looks good apart from one case where the command line tool takes takes a parameter that has spaces. In Bamboo 2.7.3 we just wrapped this value with double-quotes as you would on the command-line and everything worked fine.

In Bamboo 3.2 the double quotes seem to be being removed, thus breaking the call to the command line tool. There are a couple of other issues on the forums here where people seem to have had issues where double quotes have been in arguments defined in Bamboo. Has the way of defining this sort of thing changed?

An example of the arguments that I am trying to pass to the command line tool is

/r:"Build Phase 3" /b:default /w:c:\build\debug\Build3\x86\continuous\default /c:Debug /bv:${bamboo.buildNumber}

The first value seems to have its double quotes removed before reaching the command line, causing the tool to see a repo of "Build", invalid paramaters of "Phase" and "3" rather than a repo of "Build Phase 3" (without quotes)

3 answers

1 accepted

2 votes
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 12, 2011

What if you pass "/r:Build Phase 3" ?

Chris Gill September 12, 2011

That does work - thanks!

Are there other things that have changed like this or was the 2.7.3 implementation wrong?

Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 12, 2011

To get better control over external processes, we have changed the library that launches processes and it's one of the things that has changed together with it.

Have fun using 3.2!

0 votes
Eric Hood May 27, 2016

What about /r:\"Build Phase 3\" ?  Ron's answer gave me the idea of seeing if maybe the quote could be escaped.  I'm surprised it actually worked for me.

0 votes
Ron Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2011

Use " in place of the double quotes.

Chris Gill September 12, 2011

Ron - that doesn't work. The command line is being trucated at the first "

E.g. defining

/r:"Build Phase 3" /b:default /w:c:\build\debug\Build3\x86\continuous\default /c:Debug /bv:${bamboo.buildNumber}

Leads to just /r: being passed to the command line

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events