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

Delete old .sha1 files #401

Merged
merged 1 commit into from
Jun 3, 2020
Merged

Conversation

waj
Copy link
Member

@waj waj commented Jun 3, 2020

Files .sha1 left from previous Shards version are now deleted when the .shards.info is generated the first time.

@waj waj added this to the v0.11.0 milestone Jun 3, 2020
@waj waj merged commit 3859235 into crystal-lang:master Jun 3, 2020
@waj waj deleted the feature/delete-old-sha1-files branch June 3, 2020 17:48
Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

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

Would've been great to get time for review before merging this on the fast track.

@@ -17,6 +17,11 @@ class Shards::Info

def save
Dir.mkdir_p(@install_path)

unless File.exists?(info_path)
Dir[File.join @install_path, "*.sha1"].each { |p| File.delete(p) }
Copy link
Member

Choose a reason for hiding this comment

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

This is incorrect: Glob patterns must always use / as separator, not \ even on Windows.

taylor pushed a commit to vulk/shards that referenced this pull request Aug 11, 2020
f-fr pushed a commit to f-fr/shards that referenced this pull request Jan 2, 2021
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.

None yet

3 participants