void-packages/srcpkgs/NetAuth/patches/cli-generate.patch

37 lines
1.1 KiB
Diff
Raw Normal View History

From cb7cfa5bc0530e43fdbc227783187a141d857139 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Sat, 24 Sep 2022 17:40:11 -0400
Subject: [PATCH] internal/ctl/system-ctl: don't run initialize(), rename to
system-cli
the default initialize() is not necessary when generating completions
and docs, so we can override it with an empty function.
Also, the file was renamed to `system-cli` to put it more inline with
other files' naming conventions.
---
internal/ctl/{system-ctl.go => system-cli.go} | 3 +++
1 file changed, 3 insertions(+)
rename internal/ctl/{system-ctl.go => system-cli.go} (68%)
diff --git a/internal/ctl/system-ctl.go b/internal/ctl/system-cli.go
similarity index 68%
rename from internal/ctl/system-ctl.go
rename to internal/ctl/system-cli.go
index 3dbd9d3..0a42d05 100644
--- a/internal/ctl/system-ctl.go
+++ b/internal/ctl/system-cli.go
@@ -8,9 +8,12 @@ var (
cliCmd = &cobra.Command{
Use: "cli",
Short: "Extra utilities for the CLI",
+ PersistentPreRun: cli_initialize,
}
)
func init() {
systemCmd.AddCommand(cliCmd)
}
+
+func cli_initialize(*cobra.Command, []string) {}