From 4684799ca211b13b821a51cb0b3c87e43bd95aa8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 26 Oct 2025 08:29:43 -0500 Subject: new argv design --- exit.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'exit.go') 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) } } -- cgit v1.2.3