-
Notifications
You must be signed in to change notification settings - Fork 110
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
Use TMPDIR environment variable for temporary file path in createAndRunScript #1882
Use TMPDIR environment variable for temporary file path in createAndRunScript #1882
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @camlyall, this looks good. I wonder if we could improve that function a bit and since it lacks test coverage at the moment add a test for it. Maybe we could use pytest
monkeypatch.setenv
and tmp_path
to test the TMPDIR
case.
@camlyall Out of curiosity, are you planning to address this in the Storage Service which I think has a similar problem when compressing packages? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @camlyall! Great work.
Fixes use of hardcoded temp directory.
This fixes issue archivematica/Issues#1425
Reviewed in AM1.14
Users facing the issue 7z when mounting /tmp directory with noexec can set the environment variable
TMPDIR=/path/to/dir
in /etc/default/archivematica-mcp-client