fix: validate path
See https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/13.
This commit is contained in:
parent
7338a70ebc
commit
66e8a201ed
@ -267,6 +267,7 @@ Example:
|
|||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
|
|
||||||
if c.Bool("serve") && c.String("publish") != "" {
|
if c.Bool("serve") && c.String("publish") != "" {
|
||||||
logrus.Fatal("woops, can't publish & serve at the same time?")
|
logrus.Fatal("woops, can't publish & serve at the same time?")
|
||||||
}
|
}
|
||||||
@ -276,6 +277,10 @@ Example:
|
|||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _, err := os.Stat(root); os.IsNotExist(err) {
|
||||||
|
logrus.Fatalf("%s does not exist?", root)
|
||||||
|
}
|
||||||
|
|
||||||
logrus.Debugf("selecting %s as distribusi root", root)
|
logrus.Debugf("selecting %s as distribusi root", root)
|
||||||
|
|
||||||
var ignore []string
|
var ignore []string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user