aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse.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 /parse.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 'parse.go')
-rw-r--r--parse.go8
1 files changed, 4 insertions, 4 deletions
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