More tiny fixes/enhancements

This commit is contained in:
AlexSSD7 2023-08-29 13:29:46 +01:00
commit 8af3ab3fb6
4 changed files with 114 additions and 35 deletions

View file

@ -42,12 +42,11 @@ func doUSBRootCheck() {
ok, err := checkIfRoot()
if err != nil {
slog.Error("Failed to check whether the command is ran by root", "error", err.Error())
os.Exit(1)
return
}
if !ok {
slog.Error("USB passthrough on your OS requires this program to be ran as root")
os.Exit(1)
slog.Warn("USB passthrough on your OS usually requires this program to be ran as root")
}
}