Use URI as name for packages location paths

This commit is contained in:
Matthias Loibl 2019-08-12 17:39:09 +02:00
parent 6ed6c3f3ec
commit d3bb1f4ea4
No known key found for this signature in database
GPG key ID: 78A796CA74CA38BA
4 changed files with 16 additions and 16 deletions

View file

@ -27,7 +27,7 @@ import (
"gopkg.in/alecthomas/kingpin.v2"
)
func installCommand(dir, jsonnetHome string, paths ...string) int {
func installCommand(dir, jsonnetHome string, uris ...string) int {
if dir == "" {
dir = "."
}
@ -44,11 +44,11 @@ func installCommand(dir, jsonnetHome string, paths ...string) int {
return 1
}
if len(paths) > 0 {
for _, path := range paths {
newDep := parseDependency(dir, path)
if len(uris) > 0 {
for _, uri := range uris {
newDep := parseDependency(dir, uri)
if newDep == nil {
kingpin.Errorf("ignoring unrecognized path: %s", path)
kingpin.Errorf("ignoring unrecognized uri: %s", uri)
continue
}