aboutsummaryrefslogtreecommitdiffhomepage
path: root/print.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-01-01 21:34:57 +0900
committerOphestra <cat@gensokyo.uk>2025-01-01 21:34:57 +0900
commit6acd0d4e88af6a80836c5409023bbb6ebc57231f (patch)
treec0b5ab89cb7549e817c5dac9c0894279ac376275 /print.go
parent35b714231768d11b82e575701ca5c7a081e2c542 (diff)
linux/std: handle fsu exit status 1
Printing "exit status 1" is confusing. This handles the ExitError and returns EACCES instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'print.go')
-rw-r--r--print.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/print.go b/print.go
index e78861fa..ad230975 100644
--- a/print.go
+++ b/print.go
@@ -20,7 +20,7 @@ func printShowSystem(short bool) {
info := new(fst.Info)
// get fid by querying uid of aid 0
- if uid, err := os.Uid(0); err != nil {
+ if uid, err := sys.Uid(0); err != nil {
fmsg.Fatalf("cannot obtain uid from fsu: %v", err)
} else {
info.User = (uid / 10000) - 100
@@ -194,7 +194,7 @@ func printPs(short bool) {
now := time.Now().UTC()
var entries state.Entries
- s := state.NewMulti(os.Paths().RunDirPath)
+ s := state.NewMulti(sys.Paths().RunDirPath)
if e, err := state.Join(s); err != nil {
fmsg.Fatalf("cannot join store: %v", err)
} else {