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

Prevent running a rundoc script from deleting the script #53

Open
schneems opened this issue Jul 3, 2024 · 0 comments
Open

Prevent running a rundoc script from deleting the script #53

schneems opened this issue Jul 3, 2024 · 0 comments

Comments

@schneems
Copy link
Member

schneems commented Jul 3, 2024

Problem

The current way that rundoc works is to build into the local ./tmp dir. This can cause a problem if something in the script calls rm -rf ../.. as it can inadvertently delete the original rundoc script.

One solution

Instead of local ./tmp use Ruby's Dir.mktmpdir to make a temporary directory and do the building in there. Then if they accidentally delete it...no big deal. Once done (success/failure), move the files back to ./tmp.

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

1 participant