From 6acd0d4e88af6a80836c5409023bbb6ebc57231f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 1 Jan 2025 21:34:57 +0900 Subject: 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 --- parse.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'parse.go') diff --git a/parse.go b/parse.go index 8be4a493..85dbfca9 100644 --- a/parse.go +++ b/parse.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "io" - direct "os" + "os" "strconv" "strings" "syscall" @@ -38,7 +38,7 @@ func tryPath(name string) (config *fst.Config) { }() } } else { - r = direct.Stdin + r = os.Stdin } if err := json.NewDecoder(r).Decode(&config); err != nil { @@ -61,7 +61,7 @@ func tryFd(name string) io.ReadCloser { } fmsg.Fatalf("cannot get fd %d: %v", fd, errno) } - return direct.NewFile(fd, strconv.Itoa(v)) + return os.NewFile(fd, strconv.Itoa(v)) } } @@ -85,7 +85,7 @@ func tryShort(name string) (config *fst.Config, instance *state.State) { if likePrefix && len(name) >= 8 { fmsg.VPrintln("argument looks like prefix") - s := state.NewMulti(os.Paths().RunDirPath) + s := state.NewMulti(sys.Paths().RunDirPath) if entries, err := state.Join(s); err != nil { fmsg.Printf("cannot join store: %v", err) // drop to fetch from file -- cgit v1.3.1