Skip to content

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