File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
cmd/kubebuilder/initproject Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ func RunVendorInstall(cmd *cobra.Command, args []string) {
55
55
if ! depExists () {
56
56
log .Fatalf ("Dep is not installed. Follow steps at: https://golang.github.io/dep/docs/installation.html" )
57
57
}
58
- if Update {
58
+ if Update && depManifestExists () {
59
59
if err := updateDepManifest (); err != nil {
60
60
log .Fatalf ("error upgrading the dep manifest (Gopkg.toml): %v" , err )
61
61
}
@@ -85,6 +85,11 @@ func depExists() bool {
85
85
return err == nil
86
86
}
87
87
88
+ func depManifestExists () bool {
89
+ _ , err := os .Stat (depManifestFile )
90
+ return os .IsExist (err )
91
+ }
92
+
88
93
func createNewDepManifest () {
89
94
depTmplArgs := map [string ]string {
90
95
"Version" : version .GetVersion ().KubeBuilderVersion ,
You can’t perform that action at this time.
0 commit comments