puppetlabs / puppetlabs/puppetlabs-bash_task_helper
EXIT trap in task is ignored
Open
Nobody has claimed this yet.
bug
- Dominant language
- Ruby
- Stars
- 1
- Forks
- 11
- Avg merge
- 10h 40m
- Merged PRs (30d)
- 5
Description
According to the documentation, I can call task-exit from the newly installed trap, but it is ignored
#!/bin/bash
declare PT__installdir
source "$PT__installdir/bash_task_helper/files/task_helper.sh"
TMPFILE=$(mktemp)
trap "rm -f ${TMPFILE}; task-exit" EXIT
Temporary file is left behind
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
Reproduce the example and inspect bash_task_helper/files/task_helper.sh, especially the task-exit handling reached from the EXIT trap. Done means task-exit is honored when called from the newly installed trap and the temporary file is removed as documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100