aboutsummaryrefslogtreecommitdiffhomepage
path: root/flag.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-13 11:49:10 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-13 11:49:10 +0900
commit40d0550ad3f450ce8bb597b851a2db9721b7d6f6 (patch)
treecece1478f9a0230b0f0e8f2b9e8578c5e1cac567 /flag.go
parentda6d238d8a15fa583b384b547decbddcda28ff8b (diff)
flag: move method flag from main
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'flag.go')
-rw-r--r--flag.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/flag.go b/flag.go
index aa67908a..f69f8f33 100644
--- a/flag.go
+++ b/flag.go
@@ -2,6 +2,8 @@ package main
import (
"flag"
+
+ "git.ophivana.moe/cat/fortify/internal/util"
)
var (
@@ -39,3 +41,12 @@ func init() {
flag.BoolVar(&flagVerbose, "v", false, "Verbose output")
flag.BoolVar(&printVersion, "V", false, "Print version")
}
+
+func init() {
+ methodHelpString := "Method of launching the child process, can be one of \"sudo\", \"bubblewrap\""
+ if util.SdBootedV {
+ methodHelpString += ", \"systemd\""
+ }
+
+ flag.StringVar(&launchOptionText, "method", "sudo", methodHelpString)
+}