diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-16 18:59:45 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-16 18:59:45 +0900 |
| commit | 29c38caac8a7fb828d6eb6b421943d2cb19ffd26 (patch) | |
| tree | c190e0efbdd55411aa14e5c7a5b49f5a8f18b73c /internal/app | |
| parent | e599b5583dd821ed26bdfc01f7f67d4a317b9843 (diff) | |
app/shim/manager: return error on bad fsu path
This results in a graceful failure that does not leave garbage behind.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app')
| -rw-r--r-- | internal/app/shim/manager.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/app/shim/manager.go b/internal/app/shim/manager.go index c4605635..e5ddaadb 100644 --- a/internal/app/shim/manager.go +++ b/internal/app/shim/manager.go @@ -4,7 +4,6 @@ import ( "context" "encoding/gob" "errors" - "log" "os" "os/exec" "strconv" @@ -55,7 +54,8 @@ func (s *Shim) Start( // prepare user switcher invocation var fsu string if p, ok := internal.Path(internal.Fsu); !ok { - log.Fatal("invalid fsu path, this copy of fortify is not compiled correctly") + return nil, fmsg.WrapError(errors.New("bad fsu path"), + "invalid fsu path, this copy of fortify is not compiled correctly") } else { fsu = p } |
