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

prune - Don't raise an exception if install_path doesn't exist #557

Merged
merged 3 commits into from
Sep 22, 2022

Conversation

mjoerussell
Copy link
Contributor

I noticed that if you run shards prune in a project with the following two conditions:

  1. shards.lock exists
  2. The install directory (lib/) does not exist

Then the command raises an exception. This might not be a super common scenario, but in the context of CI it can be frustrating for this command to throw and then interrupt the whole job rather than just not doing anything.

… exists before trying to iterate over its children. Performing this check will avoid raising an uncaught

exception when running `shards prune` if a `shards.lock` file exists but the `Shards.install_path` directory does not.
Copy link
Member

@beta-ziliani beta-ziliani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@beta-ziliani beta-ziliani added this to the v0.18.0 milestone Sep 22, 2022
@straight-shoota straight-shoota merged commit 74dbf7c into crystal-lang:master Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants