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

This widget could not be displayed.

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!

This widget could not be displayed.

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

This widget could not be displayed.

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
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

262 views 1 3
Join discussion

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