microsoft / vso-agent

Visual Studio Team Services and TFS agent for Mac OSX and Linux
MIT License
131 stars 56 forks source link

CmdLine task arguments not outputing empty strings ("") #300

Closed j0tt closed 6 years ago

j0tt commented 8 years ago

When specifying an argument to the command line task in the arguments form field, "" is being ignored:

Test Data Tool: curl Arguments: http://www.google.com -d ""

Expected console commend: curl http://www.google.com -d "" Actual console command: curl http://www.google.com -d

Workaround: use single quotes.

Output Log (working folder scrubbed):

[Debug] 2016-05-04T19:06:01.740Z: filename: curl

[Debug] 2016-05-04T19:06:01.740Z: arguments: http://www.google.com -d ""

[Debug] 2016-05-04T19:06:01.740Z: workingFolder: /_work/1/s

[Debug] 2016-05-04T19:06:01.740Z: failOnStandardError: false

[Debug] 2016-05-04T19:06:01.742Z: cwd: /_work/1/s

[Debug] 2016-05-04T19:06:01.915Z: loading inputs and endpoints

[Debug] 2016-05-04T19:06:01.916Z: loading INPUT_FILENAME

[Debug] 2016-05-04T19:06:01.917Z: loading INPUT_ARGUMENTS

[Debug] 2016-05-04T19:06:01.918Z: loading INPUT_WORKINGFOLDER

[Debug] 2016-05-04T19:06:01.918Z: loading INPUT_FAILONSTANDARDERROR

[Debug] 2016-05-04T19:06:01.919Z: loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION

[Debug] 2016-05-04T19:06:01.919Z: loaded 5

[Debug] 2016-05-04T19:06:01.920Z: check path : /_work/tasks/CmdLine/1.0.23/task.json

[Debug] 2016-05-04T19:06:01.920Z: set resource file to: /_work/tasks/CmdLine/1.0.23/task.json

[Debug] 2016-05-04T19:06:01.920Z: system.culture=en-US

[Debug] 2016-05-04T19:06:01.922Z: filename=curl

[Debug] 2016-05-04T19:06:01.923Z: check path : /usr/bin/curl

[Debug] 2016-05-04T19:06:01.923Z: curl=/usr/bin/curl

[Debug] 2016-05-04T19:06:01.924Z: workingFolder=/_work/1/s

[Debug] 2016-05-04T19:06:01.924Z: path exists: /_work/1/s

[Debug] 2016-05-04T19:06:01.925Z: arguments=http://www.google.com -d ""

[Debug] 2016-05-04T19:06:01.926Z: /usr/bin/curl arg: http://www.google.com -d ""

[Debug] 2016-05-04T19:06:01.926Z: failOnStandardError=false

[Debug] 2016-05-04T19:06:01.927Z: exec tool: /usr/bin/curl

[Debug] 2016-05-04T19:06:01.927Z: Arguments:

[Debug] 2016-05-04T19:06:01.927Z: http://www.google.com

[Debug] 2016-05-04T19:06:01.928Z: -d

2016-05-04T19:06:01.928Z: [command]/usr/bin/curl http://www.google.com -d 2016-05-04T19:06:01.936Z: curl: option -d: requires parameter 2016-05-04T19:06:01.937Z: curl: try 'curl --help' or 'curl --manual' for more information

[Debug] 2016-05-04T19:06:01.941Z: rc:2

[Debug] 2016-05-04T19:06:01.941Z: success:false

[Debug] 2016-05-04T19:06:01.943Z: taskRunner fail

[Debug] 2016-05-04T19:06:01.945Z: task result: Failed

[Error] 2016-05-04T19:06:01.949Z: /usr/bin/curl failed with error: /usr/bin/curl failed with return code: 2

[Error] 2016-05-04T19:06:01.949Z:

bryanmacfarlane commented 8 years ago

Will fix in new agent

bryanmacfarlane commented 6 years ago

Deprecated. Replacement is here: https://github.com/Microsoft/vsts-agent