Skip to content

Commit

Permalink
Merge pull request #327 from droot/vendor-update-bugfix-313
Browse files Browse the repository at this point in the history
fixed gopkg.toml lookup code in vendor update
  • Loading branch information
k8s-ci-robot committed Jul 23, 2018
2 parents 2489b81 + 46d1127 commit 24a15ff
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmd/kubebuilder/initproject/vendor.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,20 @@ func depExists() bool {
return err == nil
}

// depManifestExists checks if DepManifestFile exists or not. It will panic
// if it encounters unknown errors.
func depManifestExists() bool {
_, err := os.Stat(depManifestFile)
return os.IsExist(err)
if err == nil {
// file exists
return true
}
if os.IsNotExist(err) {
return false
}
// some other error, panic
log.Fatalf("error looking up dep manifest file : %v", err)
return false
}

func createNewDepManifest() {
Expand Down

0 comments on commit 24a15ff

Please sign in to comment.