mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-11 23:50:05 +01:00
feat(install): skip dependencies
Allows `installing` a package without pulling dependencies of that package. This comes in handy when having multiple directories on `JPATH`, which overlay each other. Because dependencies may be already present at lesser ranked import paths, it's not required to pull them, when only needing to bump a single one.
This commit is contained in:
parent
d84e1d760d
commit
fd5f7f108a
5 changed files with 24 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ import (
|
|||
"github.com/jsonnet-bundler/jsonnet-bundler/spec/v1/deps"
|
||||
)
|
||||
|
||||
func installCommand(dir, jsonnetHome string, uris []string) int {
|
||||
func installCommand(dir, jsonnetHome string, uris []string, single bool) int {
|
||||
if dir == "" {
|
||||
dir = "."
|
||||
}
|
||||
|
|
@ -59,6 +59,10 @@ func installCommand(dir, jsonnetHome string, uris []string) int {
|
|||
kingpin.Fatalf("Unable to parse package URI `%s`", u)
|
||||
}
|
||||
|
||||
if single {
|
||||
d.Single = true
|
||||
}
|
||||
|
||||
if !depEqual(jsonnetFile.Dependencies[d.Name()], *d) {
|
||||
// the dep passed on the cli is different from the jsonnetFile
|
||||
jsonnetFile.Dependencies[d.Name()] = *d
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue