Automattic / Automattic/nvm-buildkite-plugin
Improve usage of `mktemp`
- Dominant language
- Shell
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
macOS appears to have a different behavior for `mktemp`, [more info here](https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x/84980#84980).
The template of `X` characters don't get replaced on macOS hosts when executing `mktemp -dt automattic-nvm-XXXXXXXX`. Instead, `(temp dir)/automattic-nvm-XXXXXXXX.vILswNaluK` is produced.
`mktemp` [usage is here](https://github.com/Automattic/nvm-buildkite-plugin/blob/561d5d72bbb89b826f2f4083e20084f6b89542a3/hooks/pre-command#L17).
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect the mktemp usage at hooks/pre-command#L17 and compare its behavior on macOS with the behavior described in the issue. Reproduce the hook on a macOS host and verify that the generated temporary directory name no longer retains the literal X characters while the plugin continues to create the expected directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100