Fix install without args

This commit is contained in:
Frederic Branczyk 2018-04-28 18:01:00 +01:00
parent 07445571e6
commit 7959a767ed
No known key found for this signature in database
GPG key ID: 7741A52782A90069

View file

@ -106,6 +106,7 @@ func installCommand(jsonnetHome string, urls ...*url.URL) int {
kingpin.Fatalf("failed to load jsonnetfile: %v", err)
return 1
}
if len(urls) > 0 {
for _, url := range urls {
// install package specified in command
@ -181,6 +182,7 @@ func installCommand(jsonnetHome string, urls ...*url.URL) int {
m.Dependencies = newDeps
}
}
}
srcPath := filepath.Join(jsonnetHome)
err = os.MkdirAll(srcPath, os.ModePerm)
@ -218,7 +220,6 @@ func installCommand(jsonnetHome string, urls ...*url.URL) int {
kingpin.Fatalf("failed to write lock file: %v", err)
return 3
}
}
return 0
}