Address PR comments

This commit is contained in:
Sam Coe 2021-07-19 10:48:09 -07:00
parent bc7eaf8004
commit b71735d0d7
No known key found for this signature in database
GPG key ID: 8E322C20F811D086

View file

@ -1,6 +1,7 @@
package extensions
import (
"errors"
"os"
"path/filepath"
"strings"
@ -34,7 +35,7 @@ func (e *Extension) IsLocal() bool {
return true
}
// Check if extension does not have a git directory
if _, err = os.Stat(filepath.Join(dir, ".git")); err != nil {
if _, err = os.Stat(filepath.Join(dir, ".git")); errors.Is(err, os.ErrNotExist) {
return true
}
return false