puppetlabs / puppetlabs/puppetlabs-bash_task_helper
helper calls exit with string value
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1
- Forks
- 11
- Avg merge
- 10h 40m
- Merged PRs (30d)
- 5
Description
When using task helper helper the following way:
task-fail 'failed' $RETVAL
Observing the following error in output
"_error" : {
"msg" : "Exited 2:\n/opt/puppetlabs/pxp-agent/spool/560/temp_task_74cc-580c-a185-d303/bash_task_helper/files/task_helper.sh: line 266: exit: warning:: numeric argument required\n",
"kind" : "puppetlabs.tasks/task-error",
This is due to helper using quotes around exit code
https://github.com/puppetlabs/puppetlabs-bash_task_helper/blob/main/files/task_helper.sh#L266
https://github.com/puppetlabs/puppetlabs-bash_task_helper/blob/main/files/task_helper.sh#L66
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with files/task_helper.sh at lines 66 and 266, then reproduce the issue with task-fail 'failed' $RETVAL. Done means the helper no longer reports a numeric-argument error when the command is run and the resulting task error output reflects the requested failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100