Skip to content

Commit

Permalink
Allow for more generic errors in loadPkg (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyItsGilbert committed Jan 6, 2023
1 parent 0cf0673 commit 74e4bde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/vale/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func readPkg(pkg, path string, idx int) error {
}

func loadPkg(name, urlOrPath, styles string, index int) error {
if fileInfo, err := os.Stat(urlOrPath); !os.IsNotExist(err) {
if fileInfo, err := os.Stat(urlOrPath); err == nil {
if fileInfo.IsDir() {
parentDirectory := strings.TrimSuffix(urlOrPath, fmt.Sprintf("%c%s", os.PathSeparator, name))
return installPkg(parentDirectory, name, styles, index)
Expand Down

0 comments on commit 74e4bde

Please sign in to comment.