fix: error out if repoPath doesn't exist
See https://github.com/ssb-ngi-pointer/go-ssb-room/issues/275.
This commit is contained in:
parent
114f1682a3
commit
c87a69f907
|
@ -53,6 +53,13 @@ func main() {
|
|||
})
|
||||
flag.Parse()
|
||||
|
||||
if _, err := os.Stat(repoPath); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
fmt.Fprintf(os.Stderr, "error: %s does not exist (-repo)?\n", repoPath)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// we require one more argument which is not a flag.
|
||||
if len(flag.Args()) != 1 {
|
||||
cliMissingArguments("please provide a public key")
|
||||
|
|
Loading…
Reference in New Issue