Skip to content

Commit

Permalink
Added handler for empty library directory
Browse files Browse the repository at this point in the history
  • Loading branch information
cgxeiji committed Nov 5, 2018
1 parent 866adc5 commit 88589fb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scholar/cmd/general.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,15 @@ func entryList() []*scholar.Entry {
path := libraryPath()
dirs, err := ioutil.ReadDir(path)
if err != nil {
panic(err)
fmt.Println(err)
fmt.Println(`
Add an entry to create this directory or run
scholar config
to set the correct path of this library.
`)
os.Exit(1)
}

var wg sync.WaitGroup
Expand Down

0 comments on commit 88589fb

Please sign in to comment.