Skip to content

Commit

Permalink
Show more useful message when photos directory or moul.toml not f…
Browse files Browse the repository at this point in the history
…ound #13
  • Loading branch information
thasophearak committed Nov 14, 2020
1 parent eb9cf52 commit 1041e0e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ func GetDirectory() (string, error) {

if _, err := os.Stat(filepath.Join(dir, "moul.toml")); os.IsNotExist(err) {
color.Red("`moul.toml` file is not found!")
color.Green("Run `moul create my-collection` to get start")
return "", err
}

if _, err := os.Stat(filepath.Join(dir, "photos")); os.IsNotExist(err) {
color.Red("`photos` directory is not found!")
color.Green("Run `moul create my-collection` to get start")
return "", err
}

Expand Down

0 comments on commit 1041e0e

Please sign in to comment.