Skip to content

Commit

Permalink
fixup: better error if no versions installed and thus no versions dir…
Browse files Browse the repository at this point in the history
… created
  • Loading branch information
dpastoor committed May 29, 2022
1 parent 237aac3 commit c24f73b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/ls.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"errors"
"fmt"
"os"
"sort"
Expand Down Expand Up @@ -35,6 +36,10 @@ func newLs(lsOpts lsOpts) error {
}
} else {
entries, err := os.ReadDir(config.GetPathToVersionsDir())
if errors.Is(err, os.ErrNotExist) {
fmt.Println("No installed quarto versions found")
return nil
}
if err != nil {
return err
}
Expand Down

0 comments on commit c24f73b

Please sign in to comment.