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

Change tests.sh for portability #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slycordinator
Copy link

  1. Changed to use /bin/sh instead of /bin/bash

Everything in the script is already posix compliant.

  1. Change to use find -exec rm -rf {} + instead of find | xargs rm -rf

This avoids the edge case of when one of the paths to the subdirectories have spaces or other unusual characters.

An alternative fix for that is to use "find . -name pycache -type d -print0 | xargs -0 rm -rf", but this is a less portable option

1) Changed to use /bin/sh instead of /bin/bash

Everything in the script is already posix compliant.

2) Change to use find -exec rm -rf {} +  instead of find | xargs rm -rf

This avoids the edge case of when one of the paths to the subdirectories have spaces or other unusual characters.

An alternative fix for that is to use "find . -name __pycache__ -type d -print0 | xargs -0 rm -rf", but this is a less portable option
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

Successfully merging this pull request may close these issues.

1 participant