Skip to content

Use unique temp file for installer to fix multi-user collision#270

Open
drewrobson wants to merge 1 commit intoJuliaPy:masterfrom
drewrobson:fix-tempfile-collision
Open

Use unique temp file for installer to fix multi-user collision#270
drewrobson wants to merge 1 commit intoJuliaPy:masterfrom
drewrobson:fix-tempfile-collision

Conversation

@drewrobson
Copy link

Summary

  • On multi-user systems, the hardcoded /tmp/installer.sh path causes EPERM errors when one user's leftover file blocks another user due to the sticky bit on /tmp
  • Replace joinpath(tempdir(), "installer.sh") with tempname(), which generates a unique path per invocation and avoids the collision entirely

Fixes #253

Test plan

  • Verified the diff is minimal and preserves existing behavior (the installer path is only used locally within _install_conda)
  • tempname() is a Julia stdlib function that returns a unique temporary file path, so no new dependencies are introduced

🤖 Generated with Claude Code

On multi-user systems, the hardcoded `/tmp/installer.sh` path causes
EPERM errors when one user's leftover file blocks another user due to
the sticky bit on /tmp. Using `tempname()` generates a unique path
per invocation, avoiding the collision entirely.

Fixes JuliaPy#253

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.84%. Comparing base (f1f4760) to head (53bffae).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #270      +/-   ##
==========================================
- Coverage   85.22%   84.84%   -0.38%     
==========================================
  Files           1        1              
  Lines         203      198       -5     
==========================================
- Hits          173      168       -5     
  Misses         30       30              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Successfully merging this pull request may close these issues.

Conda installation leaves tmp/installer.sh behind

2 participants