Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure mktemp creates files in a apropiate directory #667

Open
MAProsper opened this issue May 24, 2024 · 0 comments
Open

Ensure mktemp creates files in a apropiate directory #667

MAProsper opened this issue May 24, 2024 · 0 comments

Comments

@MAProsper
Copy link

Currently all uses of mktemp in scripts use a template that generate the file at the current working directory. This directory may not be writeable, desirable to use and additionally in the event of a interruption or termination it leaves the file in a location where the system will probably not clean it up.

This could be fixed prepending the patten with ${TMPDIR:-/tmp}/. This selects an appropriate directory, follows the same logic as the default behaviour of mktemp and is compatible with coreutils's and busybox's mktemp implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant