Edgewall Software
Modify

Opened 16 years ago

Last modified 10 years ago

#337 new defect

backslashes are removed in Ant command 'args' parameter

Reported by: claude@… Owned by: cmlenz
Priority: major Milestone: 0.6.1
Component: Recipe commands Version: 0.5.3
Keywords: Cc:
Operating System: Windows

Description

When passing arguments that contain backslashes into the 'args' parameter of the Ant Bitten command the backslashes are removed.

I investigated a bit and the bitten.build.javatools#ant function is using shlex.split to transform the args line into a list and shlex.split seems not to work well with backslashes.

Attachments (0)

Change History (4)

comment:1 Changed 16 years ago by wbell

I'm assuming this is in the recipe text. Can you give an example? I know we use backslashes here to escape spaces; does doubling the backslashes do the right thing?

comment:2 Changed 16 years ago by anonymous

Well, I did not test it directly using the ant command in a recipe. I am actually creating another command that is somehow extending the ant command. But for sure the following will fail:

<java:ant file="build.xml" target="init" args="-Dargs.input=c:\map.xml" />

I am using python 2.4 and in this version shlex.split actually removes the back-slashes, even when doubled. See http://bugs.python.org/issue1724822 The 2.6 version seems to have solved the issue but may be you should provide an alternative while bitten cannt support 2.6.

The only workaround I found so far is to replace back-slashes with forward-slashes before calling the ant command.

comment:3 Changed 15 years ago by osimons

  • Milestone changed from 0.6 to 0.6.1

comment:4 Changed 11 years ago by osimons

  • Keywords RhnzUI ghUnxCczpf72ndOqi20g removed

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain cmlenz.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.