aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yae.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/yae.go b/yae.go
index 30c1733..d943555 100644
--- a/yae.go
+++ b/yae.go
@@ -30,7 +30,16 @@ func main() {
return nil
}
- return sources.Load(c.String("sources"))
+ location := c.String("sources")
+
+ if _, err := os.Stat(location); os.IsNotExist(err) {
+ return fmt.Errorf(
+ "file `%s` was not present, run `yae init` to create it",
+ location,
+ )
+ }
+
+ return sources.Load(location)
},
Flags: []cli.Flag{
&cli.StringFlag{