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

Tempdir in script #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

spitz-dan-l
Copy link
Contributor

This is changes how redun scripts create and manage the optional temp dir.

Previously the temp dir was created and later removed by the "host" machine. This led to errors using tempdir=True on remote tasks. (Issue: #20)

With this change, the tempdir creation and removal happens within the shell script that redun generates to wrap the user command. This means it all happens in one place, and the error mentioned above is avoided.

Note- I used the shell scripting pattern mentioned in this stackoverflow to schedule the deletion whenever the script exits. I'm not super confident that this is the best way to do the cleanup, but it seems functional and didn't require me to muck about in get_wrapped_command(). Happy to update based on feedback or just leave this here as a simple demo.

Cheers!

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

Successfully merging this pull request may close these issues.

1 participant