kyoheiu / felix

tui file manager with vim-like key mapping
https://kyoheiu.dev/felix/
MIT License
708 stars 24 forks source link

A way to opt out of version checking #194

Closed folliehiyuki closed 1 year ago

folliehiyuki commented 1 year ago

I'm intending to package felix. Since the update process is tied to the distro packaing, I want it to not check for update by any means (the user won't be able to update the package anyway). Also, since it just spawn a cargo command, it will just print the error message for lots of normal users not having cargo installed.

Adding a feature flag at build time to toggle the version check behavior (on running fx --version) would be nice.

kyoheiu commented 1 year ago

Thanks, you're right: The cargo command does not work for many cases. I'll remove at least the cargo search line. Is printing the current version OK for your use case? Also, could you tell me to which repository you're going to package?

folliehiyuki commented 1 year ago

Is printing the current version OK for your use case?

I'm doing exactly that (printing the current version only). I made a naive patch here just to remove the check_version function: https://gitlab.alpinelinux.org/alpine/aports/-/blob/432db0e2c870d11b187b75627585d678372489f9/testing/felix/disable-version-check.patch

Also, could you tell me to which repository you're going to package?

The attempt can be seen here: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/46337. It's for AlpineLinux.

kyoheiu commented 1 year ago

I'm doing exactly that (printing the current version only). I made a naive patch here just to remove the check_version function: https://gitlab.alpinelinux.org/alpine/aports/-/blob/432db0e2c870d11b187b75627585d678372489f9/testing/felix/disable-version-check.patch

Smart and clear. I'll change the code like this in the next release. It is a very simple change and will only take a few days. (Of course PR is welcomed though) Please let me know when the packaging is finished.

edit: typo

folliehiyuki commented 1 year ago

The MR got merged. felix should be available on AlpineLinux edge's testing repo now.

kyoheiu commented 1 year ago

Released #195