History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-1598
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Robin Shen
Reporter: Michael Nicolai-Deutschmann
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Using quotes on arguments without spacing

Created: 29/Mar/13 08:22 AM   Updated: 29/Mar/13 08:24 AM
Component/s: None
Affects Version/s: 5.0.14
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: All


 Description  « Hide
Hi,

I'm currently having the following problem/question:

In a Shell/Batch command build step, I would like to execute this:

"C:\\Program Files (x86)\\VBP Updater\\VBPUpdater.exe" -c"C:\\SVN\\svn\\AutomatedBuild\\AutomatedBuild 2.0\\VBPUpdaterBinaryCompatibilitytrue.ini" "C:\\SVN\\svn\\AutomationSuite\\src\\License\\ObjectHandler\\CtHandler.vbp.template"

When I run the config, I get an error message:

Failed to run command: "C:\Program Files (x86)\VBP Updater\VBPUpdater.exe" "-cC:\SVN\svn\AutomatedBuild\AutomatedBuild 2.0\VBPUpdaterBinaryCompatibilitytrue.ini" C:\SVN\svn\AutomationSuite\src\License\ObjectHandler\CtHandler.vbp.template

The problem is, that the command line switch "-c" is INSIDE the double quotes: "-cC:\SVN\svn\..."

This is wrong. What I would like to achieve is:

"C:\Program Files (x86)\VBP Updater\VBPUpdater.exe" -c"C:\SVN\svn\AutomatedBuild\AutomatedBuild 2.0\VBPUpdaterBinaryCompatibilitytrue.ini" C:\SVN\svn\AutomationSuite\src\License\ObjectHandler\CtHandler.vbp.template

When I put a space between -c and "C:\...", I get

Failed to run command: "C:\Program Files (x86)\VBP Updater\VBPUpdater.exe" -c "C:\SVN\svn\AutomatedBuild\AutomatedBuild 2.0\VBPUpdaterBinaryCompatibilitytrue.ini" C:\SVN\svn\AutomationSuite\src\License\ObjectHandler\CtHandler.vbp.template

Now the quotes are AFTER the "-c" (which is somewhat correct, but the space char is unwanted).

How can I resolve this issue?

Greetings,
Michael

 All   Comments   Work Log   Change History      Sort Order:
Michael Nicolai-Deutschmann [29/Mar/13 08:23 AM]
by robinshine » Tue Mar 26, 2013 2:57 am

When interpretes command, QB assumes that arguments without spacing is a single argument. To avoid this issue, you may put your command in a batch file, and call that batch file instead.

Michael Nicolai-Deutschmann [29/Mar/13 08:24 AM]
Oh, I see.
Of course I can create a batch file to do the job, but that's making it more complex than it could have been.

Can you implement some sort of escaping or some special characters one can use to avoid standard behaviour?

C:\my\program.exe -c"hello" ---> C:\my\program.exe "-chello"

C:\my\program.exe &{-c}"hello" ---> C:\my\program.exe -c"hello"

Greetings,
Michael

Michael Nicolai-Deutschmann [29/Mar/13 08:24 AM]
by robinshine » Thu Mar 28, 2013 11:40 pm

Please submit an improvement request for that. Thanks!