Skip to content

Commit

Permalink
Merge pull request #50 from appleboy/patch
Browse files Browse the repository at this point in the history
chore(manager): also check err is nil or not
  • Loading branch information
popcornylu authored Jun 17, 2022
2 parents faaada2 + 81dd5ec commit 018fcd9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/core/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ func NewArtifactManager(config ArtConfig) (*ArtifactManager, error) {
}

finfo, err := os.Stat(baseDir)
if err == nil {
if !finfo.IsDir() {
return nil, errors.New(baseDir + " is not a directory")
}
if err != nil || !finfo.IsDir() {
return nil, errors.New(baseDir + " is not a directory")
}

// init the metadata path
Expand Down

0 comments on commit 018fcd9

Please sign in to comment.