main: replace naked panic with log.Panic
Fix the check that failed to find the case as well.
This commit is contained in:
parent
1a5e9cfb1e
commit
3f9a4bbcaa
3
main.go
3
main.go
@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
@ -89,7 +90,7 @@ func changePassword(args *argContainer) {
|
|||||||
exitcodes.Exit(err)
|
exitcodes.Exit(err)
|
||||||
}
|
}
|
||||||
if len(masterkey) == 0 {
|
if len(masterkey) == 0 {
|
||||||
panic("empty masterkey")
|
log.Panic("empty masterkey")
|
||||||
}
|
}
|
||||||
tlog.Info.Println("Please enter your new password.")
|
tlog.Info.Println("Please enter your new password.")
|
||||||
newPw := readpassword.Twice(args.extpass)
|
newPw := readpassword.Twice(args.extpass)
|
||||||
|
Loading…
Reference in New Issue
Block a user