Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Answer accepted

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!

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.

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center is here!

G’day Bamboo customers, The wait is over! Bamboo Data Center edition you have been asking for is finally here! This self-managed enterprise offering of Bamboo has the resilience, reliability, and s...

542 views 1 17
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you