crystal-lang / shards

Dependency manager for the Crystal language
Other
763 stars 100 forks source link

re-enabled ~ support in path resolver #538

Closed masukomi closed 2 years ago

masukomi commented 2 years ago

Resolves #308

as per suggestion of @ysbaddaden

⚠️ WARNING: I just did what was suggested. It seems to compile, but I did not actually unit test this because most of the unit tests fail for me without any changes on my part.

straight-shoota commented 2 years ago

I added a spec and fixed the implementation File.expand_path requires tilde expansion explicitly enabled (home: true).

straight-shoota commented 2 years ago

Note: Besides enabling support for tilde expansion, this also improves the error message for nonexistent paths. When the path doesn't exist, you currently get the error Missing "shard.yml" for "nonexistent". With this change it will be Failed no such path: non/existent/path.