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>
This commit is contained in:
parent
e599b5583d
commit
29c38caac8
@ -4,7 +4,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/gob"
|
"encoding/gob"
|
||||||
"errors"
|
"errors"
|
||||||
"log"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -55,7 +54,8 @@ func (s *Shim) Start(
|
|||||||
// prepare user switcher invocation
|
// prepare user switcher invocation
|
||||||
var fsu string
|
var fsu string
|
||||||
if p, ok := internal.Path(internal.Fsu); !ok {
|
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 {
|
} else {
|
||||||
fsu = p
|
fsu = p
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user