Closed Bug 1190045 Opened 10 years ago Closed 10 years ago

Arguments could not be passed by cmdline

Categories

(Taskcluster :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sousmangoosta, Assigned: garndt)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:40.0) Gecko/20100101 Firefox/40.0 Build ID: 20150727174134 Steps to reproduce: Use that type of cmdline: taskcluster run --owner toto --provisioner-id=aws-provisioner-v1 --worker-type=b2gtest -e BUILD_OPTS=debug ubuntu:14.04 '/usr/bin/dpkg --list' Actual results: The command in the payload appears like this: "payload": { "image": "ubuntu:14.04", "command": [ "/usr/bin/dpkg --list" ], Expected results: The command in the payload should appears like that: "command": [ "/usr/bin/dpkg", "--list" ],
Summary: Arguments could not be passe by cmdline → Arguments could not be passed by cmdline
Have you tried: $ $ taskcluster run --owner toto --provisioner-id=aws-provisioner-v1 --worker-type=b2gtest -e BUILD_OPTS=debug ubuntu:14.04 /usr/bin/dpkg --list or: $ taskcluster run --owner toto --provisioner-id=aws-provisioner-v1 --worker-type=b2gtest -e BUILD_OPTS=debug ubuntu:14.04 -- /usr/bin/dpkg --list I'm not expert on tc-cli, but isn't that how one would normally specify it? (following GNU cli guidelines)
so for taskcluster-cli you could certainly do "-- <command> --<command flag>" and it works correctly, or we could just have the general rule that command should be enclosed by quotes and merge the PR that was submitted. I'm inclined to go the quoting route because it would be the closest to running as the command you would for `docker run`. Even better we see if there is a way with the current command argument parsing or a different package that could handle this better.
Ok, this one works: taskcluster run --owner toto --provisioner-id=aws-provisioner-v1 --worker-type=b2gtest -e BUILD_OPTS=debug ubuntu:14.04 -- dpkg --list with quotes it failed: taskcluster run --owner toto --provisioner-id=aws-provisioner-v1 --worker-type=b2gtest -e BUILD_OPTS=debug ubuntu:14.04 '-- dpkg --list' TypeError: Cannot call method 'toUpperCase' of undefined at /usr/lib/node_modules/taskcluster-cli/node_modules/yargs/lib/minimist.js:31:33 at Array.map (native) at toCamelCase (/usr/lib/node_modules/taskcluster-cli/node_modules/yargs/lib/minimist.js:30:31) at setArg (/usr/lib/node_modules/taskcluster-cli/node_modules/yargs/lib/minimist.js:85:21) at module.exports (/usr/lib/node_modules/taskcluster-cli/node_modules/yargs/lib/minimist.js:160:17) at parseArgs (/usr/lib/node_modules/taskcluster-cli/node_modules/yargs/index.js:451:22) at Object.Argv.Object.defineProperty.get [as argv] (/usr/lib/node_modules/taskcluster-cli/node_modules/yargs/index.js:446:36) at module.exports (/usr/lib/node_modules/taskcluster-cli/node_modules/yargs/index.js:15:28) at Array.forEach (native) at Object.<anonymous> (/usr/lib/node_modules/taskcluster-cli/node_modules/yargs/index.js:14:19) Could you modify the exemple, currently we have: $ taskcluster run Run a task within the task cluster Examples: taskcluster run -e BUILD_OPTS=debug ubuntu:14.04 'make -j=5'
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee: nobody → garndt
You need to log in before you can comment on or make changes to this bug.