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

Improve the test_setup script in Makefile to prevent accidental deletion #181

Closed
siddhant-deepsource opened this issue Jul 25, 2022 · 2 comments

Comments

@siddhant-deepsource
Copy link
Contributor

The test_setup recipe in Makefile has a step: cd ${CODE_PATH} && ls -A1 | xargs rm -rf which can accidently delete some significant directories if CODE_PATH is not configured.

@akshayamadhuri
Copy link

i think to prevent this issue it is recommended to either set the CODE_PATH environment variable to a safe value before running the test_setup recipe, or to modify the recipe so that it only deletes specific files or directories that are not needed for the test. Additionally, you may want to add a check in the recipe to ensure that the CODE_PATH environment variable is set to a non-empty value before proceeding with the deletion step.

@vishnu-deepsource
Copy link
Contributor

We should add unit tests. Closing this in favour of #241

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

3 participants