zyedidia / eget

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

usage of asset_filter breaks target #64

Closed leapfog closed 2 months ago

leapfog commented 1 year ago

With the following simple config file

[global]
  target = "~/bin"
  upgrade_only = true

the command eget neovim/neovim downloads the appimage and places it in ~/bin.

But when I add

["neovim/neovim"]
   asset_filters = "nvim.appimage"

the download ends up in ./ (i.e. the current directory).

patinthehat commented 1 year ago

@leapfog It looks like this might be a bug related to the expansion of the tilde (~). Can you verify that it works correctly if you use an absolute pathname in the [global] section for target?

i.e.,

[global]
  target = "/home/someuser/bin"
  upgrade_only = true
leapfog commented 1 year ago

No, that doesn't help.

But testing that, it seems, that adding asset_filters = "nvim.appimage" simply (and silently!) breaks reading the global section config file.

update:

using asset_filters = [ "nvim.appimage" ] makes the whole thing work.

but also #65 happens here: nvim is downloaded/overwritten every time.

patinthehat commented 1 year ago

@leapfog Does using the array syntax fix this? Just trying to narrow down the possibilities here.

["neovim/neovim"]
   asset_filters = [ "nvim.appimage" ]
hhromic commented 10 months ago

I think this is an effect of what I just reported in #84. When a configuration file is malformed, eget simply ignores it and uses defaults if no other valid config files are found. The default for target is to save the binaries in the current directory.

In that isssue I'm also proposing for eget to report configuration file errors instead of ignoring them. This would make this kind of issues very visible and less confusing.

zyedidia commented 2 months ago

I believe this is fixed by #85.