dub icon indicating copy to clipboard operation
dub copied to clipboard

Fails to expand ~ in path

Open jacob-carlborg opened this issue 8 years ago • 2 comments

If I have a dependency in dub.sdl like this:

dependency "vibe-d" path="~/development/d/vibe.d"

Dub fails to expand ~ to the home directory. The error message I get is something like:

No package file found in /Users/jacob/development/d/foo/~/development/d/vibe.d/, expected one of dub.json/dub.sdl/package.json

jacob-carlborg avatar Feb 11 '16 10:02 jacob-carlborg

~ is a bashism, and I am not sure we should implement it. For reference, this is the behavior: https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html

To properly implement it, we need to support ~, ~-, ~+, ~name, etc... I would close this as WONTFIX.

Geod24 avatar Sep 11 '22 10:09 Geod24

I would go with a minimal implementation of just ~/, we have std.path:expandTilde after all, and then just call it done. Definitely think it's worth supporting it for users.

WebFreak001 avatar Sep 11 '22 16:09 WebFreak001