fix LocalPackage install for relative paths

The vendor dir (here called "dir") is already joined with the CWD
in installCommand(). it should not be joined again here.

Also adds a logging message to show that a local package was
installed.
This commit is contained in:
Benoit Gagnon 2020-04-30 22:45:49 -04:00
parent ccd60c13eb
commit 13568d0b65
2 changed files with 6 additions and 2 deletions

View file

@ -72,7 +72,8 @@ func installCommand(dir, jsonnetHome string, uris []string, single bool) int {
}
}
locked, err := pkg.Ensure(jsonnetFile, filepath.Join(dir, jsonnetHome), lockFile.Dependencies)
vendorDir := filepath.Join(dir, jsonnetHome)
locked, err := pkg.Ensure(jsonnetFile, vendorDir, lockFile.Dependencies)
kingpin.FatalIfError(err, "failed to install packages")
pkg.CleanLegacyName(jsonnetFile.Dependencies)