Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Option to disable update checks #662

Closed
4 tasks done
matteo-pacini opened this issue Jan 7, 2025 · 6 comments · Fixed by #676
Closed
4 tasks done

✨ Option to disable update checks #662

matteo-pacini opened this issue Jan 7, 2025 · 6 comments · Fixed by #676
Labels

Comments

@matteo-pacini
Copy link

Feature Request Description

I have a quick request: could you add an environment variable that completely disables update checks? This would make builds fully deterministic for package managers like Nix and help users in restricted or offline environments.

i.e. Fastlane uses FASTLANE_SKIP_UPDATE_CHECK set to 1

Screenshots

No response

Additional Context

I maintain the Loop package on Nix (https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/lo/loopwm/package.nix#L37)

Final Checks

  • My issue is written in English
  • My issue title is descriptive
  • This is a single feature request (multiple feature requests should be reported individually)
  • I can help with the improvement or development of this feature (tick if you can help)
@MrKai77
Copy link
Owner

MrKai77 commented Jan 7, 2025

Thanks @matteo-pacini! We can definitely look into that :)

@SenpaiHunters
Copy link
Collaborator

Hey, this is not too hard to do, would a defaults write key be fine for you? Not very familiar with nix as I am with brew.

@SenpaiHunters
Copy link
Collaborator

I went ahead and did this anyway, in an upcoming developer build, you'll be able to, disable automatic updates with defaults write com.MrKai77.Loop updatesEnabled -bool false and reset (to default of true) with defaults delete com.MrKai77.Loop updatesEnabled. This will be via CLI, and not have any GUI changes, except a disabled update button.

Image

@matteo-pacini
Copy link
Author

@SenpaiHunters defaults won't work for us, hence the request for an environment variable.
(Long story short, we can't use defaults to alter the system when using Nix, but we can wrap an executable and launch it with more arguments / env variables)

I'm happy to help with that implementation if needed (I'm an Obj-C / Swift dev too).

@SenpaiHunters
Copy link
Collaborator

Alright, as per your request there is now an env pull, you should be able to do LOOP_SKIP_UPDATE_CHECK=1.

I think this is how it's done on Nix, i don't use Nix, so don't quote me

{
  environment.systemPackages = [
    (pkgs.writeShellScriptBin "loop" ''
      LOOP_SKIP_UPDATE_CHECK=1 ${pkgs.Loop}/Applications/Loop.app/Contents/MacOS/Loop
    '')
  ];
}

In testing it worked all the time, so hopefully, this addresses your request.

Image

Image

@SenpaiHunters SenpaiHunters linked a pull request Jan 21, 2025 that will close this issue
@matteo-pacini
Copy link
Author

Thank you so much, @SenpaiHunters !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants