Skip to content

Improved error message for version restrictions #633

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style & uniformity
  • Loading branch information
beta-ziliani committed Nov 6, 2024
commit ed7525b081d1ba253104e3e9bd7b6f22ec37a1b8
4 changes: 2 additions & 2 deletions src/resolvers/fossil.cr
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ module Shards
end

def available_tags : Array(String)
tags = capture("fossil tag list -R #{Process.quote(local_fossil_file)}")
.split('\n', remove_empty: true)
capture("fossil tag list -R #{Process.quote(local_fossil_file)}")
.lines.reject!(&.empty?)
end

protected def versions_from_tags
Expand Down
6 changes: 3 additions & 3 deletions src/resolvers/git.cr
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ module Shards
end

def available_tags : Array(String)
tags = capture("git tag --list #{GitResolver.git_column_never}")
.split('\n', remove_empty: true)
capture("git tag --list #{GitResolver.git_column_never}")
.lines.reject!(&.empty?)
end

protected def versions_from_tags
tags = available_tags.compact_map { |tag| Version.new($1) if tag =~ VERSION_TAG }
available_tags.compact_map { |tag| Version.new($1) if tag =~ VERSION_TAG }
end

def install_sources(version : Version, install_path : String)
Expand Down
2 changes: 1 addition & 1 deletion src/resolvers/hg.cr
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ module Shards
.lines
.sort!

tags.reject(&.empty?)
tags.reject!(&.empty?)
end

def available_releases : Array(Version)
Expand Down