zyedidia / eget

Easily install prebuilt binaries from GitHub.
MIT License
866 stars 39 forks source link

--to ~/bin does not install to $HOME/bin/ #74

Closed Dialga closed 2 months ago

Dialga commented 1 year ago

For example I tried eget svenstaro/miniserve --to=~/bin expecting miniserve to be installed into the bin folder in $HOME but rather it created a ~ folder in the current directory and renamed miniserve to bin. This is not expected at all since help specifies: --to= move to given location after extracting. meaning move the executable to that folder.

dufferzafar commented 1 year ago

Yeah, this seems to be because the shell is not expanding ~ to $HOME, but passing ~ literally to eget

It works for me if you ditch the = and use eget svenstaro/miniserve --to ~/bin

Dialga commented 1 year ago

Is there a way for go to expand paths?

dufferzafar commented 1 year ago

Something like this could work: https://stackoverflow.com/a/17617721

But, I don't really think this is high value, because such expansions should ideally be handled by the shell.

zyedidia commented 1 year ago

We already have the internal home package to do this kind of expansion, but I agree I am not sure if we should just leave this to the shell to expand. I guess given that doing the expansion is easy maybe it is worth doing for the to=… case.