summaryrefslogtreecommitdiff
path: root/exit.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-26 08:29:43 -0500
committerJeff Carr <[email protected]>2025-10-26 08:29:43 -0500
commit4684799ca211b13b821a51cb0b3c87e43bd95aa8 (patch)
treefc23a62eed2b8d091e135c69f7e90bd6df24ff31 /exit.go
parent213d7bd6749471c583534e76f9c29c5b0183a4cb (diff)
new argv design
Diffstat (limited to 'exit.go')
-rw-r--r--exit.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/exit.go b/exit.go
index 5dab98a..346df03 100644
--- a/exit.go
+++ b/exit.go
@@ -9,13 +9,14 @@ import (
"os"
"go.wit.com/lib/gui/shell"
+ "go.wit.com/lib/protobuf/argvpb"
"go.wit.com/log"
)
// exits if not root
func checkSuperuser() {
if os.Getuid() != 0 {
- me.argv.BadExit("need sudo", errors.New("this requires sudo acces"))
+ argvpb.BadExit("need sudo", errors.New("this requires sudo acces"))
}
}
@@ -31,7 +32,7 @@ func exitOnError(cmd []string) {
_, err = shell.RunVerbose(cmd)
if err != nil {
msg := fmt.Sprintf("Ran: %v", cmd)
- me.argv.BadExit(msg, err)
+ argvpb.BadExit(msg, err)
}
}
@@ -41,6 +42,6 @@ func exitOnErrorRealtime(cmd []string) {
_, err = shell.RunRealtimeError(cmd)
if err != nil {
msg := fmt.Sprintf("Ran: %v", cmd)
- me.argv.BadExit(msg, err)
+ argvpb.BadExit(msg, err)
}
}