crystal-lang / shards

Dependency manager for the Crystal language
Other
765 stars 102 forks source link

Wrong error message if git is unvailable #525

Closed carlhoerberg closed 1 year ago

carlhoerberg commented 3 years ago

If the git command is unavailable I get:

Locked version 0.1.1 for PKG was not found in git: https://gitlab.com/X/PKG.git.

Instead of expected:

Error missing git command line tool. Please install Git first!

I guess https://github.com/crystal-lang/shards/blob/02055f9588f2b80c7dfd290b5a29051744ef0c00/src/resolvers/git.cr#L421 is swallowed here: https://github.com/crystal-lang/shards/blob/02055f9588f2b80c7dfd290b5a29051744ef0c00/src/molinillo_solver.cr#L33

straight-shoota commented 1 year ago

Shards 0.17.2 prints "Failed to clone" but doesn't say anything about why it failed (i.e. that git is not available).

$ shards install
Resolving dependencies
Fetching https://github.com/athena-framework/framework.git
Failed to clone https://github.com/athena-framework/framework.git