Propagate exit code for nsfakeroot command
This commit is contained in:
parent
bb05559c1f
commit
d34dcaca37
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
|
||||||
"lure.sh/fakeroot"
|
"lure.sh/fakeroot"
|
||||||
"lure.sh/fakeroot/loginshell"
|
"lure.sh/fakeroot/loginshell"
|
||||||
@ -46,7 +47,9 @@ func main() {
|
|||||||
c.Stderr = os.Stderr
|
c.Stderr = os.Stderr
|
||||||
|
|
||||||
err = c.Run()
|
err = c.Run()
|
||||||
if err != nil {
|
if err, ok := err.(*exec.ExitError); ok {
|
||||||
|
os.Exit(err.ExitCode())
|
||||||
|
} else if err != nil {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user