Fix typo in parseDependency name and add tests

This commit is contained in:
Matthias Loibl 2019-07-22 18:37:16 +02:00
parent 95226f7f9b
commit 4630466006
No known key found for this signature in database
GPG key ID: 78A796CA74CA38BA
3 changed files with 82 additions and 9 deletions

View file

@ -46,14 +46,7 @@ func installCommand(dir, jsonnetHome string, paths ...string) int {
if len(paths) > 0 {
for _, path := range paths {
// install package specified in command
// $ jsonnetpkg install ksonnet git@github.com:ksonnet/ksonnet-lib
// $ jsonnetpkg install grafonnet git@github.com:grafana/grafonnet-lib grafonnet
// $ jsonnetpkg install github.com/grafana/grafonnet-lib/grafonnet
//
// github.com/(slug)/(dir)
newDep := parseDepedency(path)
newDep := parseDependency(path)
if newDep == nil {
kingpin.Errorf("ignoring unrecognized path: %s", path)
continue