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

TMPDIR overlaps on OS X #24

Open
aburks opened this issue Sep 24, 2015 · 3 comments
Open

TMPDIR overlaps on OS X #24

aburks opened this issue Sep 24, 2015 · 3 comments

Comments

@aburks
Copy link

aburks commented Sep 24, 2015

When creating TMPDIR on OS X it doesn't seem to be unique on each run of the script, especially if using the "zip" type. The fix for me was to initialize TMPDIR as follows:

TMPDIR=`mktemp -d 2>/dev/null || mktemp -d -t '$PROGRAM.XXXXXX'`

This fix is safe for both Linux and OS X.

@aburks
Copy link
Author

aburks commented Sep 24, 2015

This script is awesome, by the way: thanks for publishing it!

@dmick
Copy link

dmick commented Nov 16, 2016

discovered this today too

@dmick
Copy link

dmick commented Nov 16, 2016

a perhaps-more-concise fix suggested by http://stackoverflow.com/questions/31396985/why-is-mktemp-on-os-x-broken-with-a-command-that-worked-on-linux:

TMPDIR=`mktemp -d "${TMPDIR:-/tmp}/$PROGRAM.XXXXXX"`

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

2 participants