From 3dcfe643700283f591f61c57ffb14e0a96fa9c07 Mon Sep 17 00:00:00 2001 From: Gabriel Simmer Date: Fri, 21 Jul 2023 08:24:38 +0100 Subject: flyctl: add auto update disable patch --- pkgs/development/web/flyctl/default.nix | 4 ++-- .../web/flyctl/disable-auto-update.patch | 25 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/web/flyctl/disable-auto-update.patch diff --git a/pkgs/development/web/flyctl/default.nix b/pkgs/development/web/flyctl/default.nix index baacc5bf128..00a3bd586f6 100644 --- a/pkgs/development/web/flyctl/default.nix +++ b/pkgs/development/web/flyctl/default.nix @@ -25,6 +25,8 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; + patches = [ ./disable-auto-update.patch ]; + preBuild = '' go generate ./... ''; @@ -43,8 +45,6 @@ buildGoModule rec { --fish <($out/bin/flyctl completion fish) \ --zsh <($out/bin/flyctl completion zsh) ln -s $out/bin/flyctl $out/bin/fly - # If autoupdate is true, we get into an autoupdate loop - $out/bin/flyctl settings autoupdate disable ''; passthru.tests.version = testers.testVersion { diff --git a/pkgs/development/web/flyctl/disable-auto-update.patch b/pkgs/development/web/flyctl/disable-auto-update.patch new file mode 100644 index 00000000000..d6c59755f88 --- /dev/null +++ b/pkgs/development/web/flyctl/disable-auto-update.patch @@ -0,0 +1,25 @@ +From 9c76dbff982b0fd8beaffae42a6e98bc1e67f089 Mon Sep 17 00:00:00 2001 +From: Gabriel Simmer +Date: Fri, 21 Jul 2023 08:16:52 +0100 +Subject: [PATCH] Disable auto update + +--- + internal/config/config.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/internal/config/config.go b/internal/config/config.go +index 1914f8e0..958baf27 100644 +--- a/internal/config/config.go ++++ b/internal/config/config.go +@@ -141,7 +141,7 @@ func (cfg *Config) ApplyFile(path string) (err error) { + AutoUpdate bool `yaml:"auto_update"` + } + w.SendMetrics = true +- w.AutoUpdate = true ++ w.AutoUpdate = false + + if err = unmarshal(path, &w); err == nil { + cfg.AccessToken = w.AccessToken +-- +2.41.0 + -- cgit 1.4.1