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

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

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

That does work - thanks!

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

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!

Use " in place of the double quotes.

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

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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,802 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you