Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/bindown/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ type rootCmd struct {
}

func (r *rootCmd) BeforeApply(k *kong.Context) error {
if k == nil || k.Selected() == nil {
return nil
}
// set dependency positional to optional for install, wrap, download and extract.
// We do this because we want to allow --all to be equivalent to specifying all
// dependencies but want the help output to indicate that a dependency is required.
Expand Down
2 changes: 2 additions & 0 deletions cmd/bindown/dependency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ dependencies:
runner := newCmdRunner(t)
srcFile := filepath.Join(runner.tmpDir, "template-source.yaml")
runner.writeConfigYaml(fmt.Sprintf(`
systems: ["linux/amd64", "darwin/amd64"]
url_checksums:
foo-linux-amd64-1.2.3: deadbeef
foo-darwin-amd64-1.2.3: deadbeef
Expand Down Expand Up @@ -436,6 +437,7 @@ dependencies:
runner := newCmdRunner(t)
srcFile := filepath.Join(runner.tmpDir, "template-source.yaml")
runner.writeConfigYaml(fmt.Sprintf(`
systems: ["linux/amd64", "darwin/amd64"]
url_checksums:
foo-linux-amd64-1.2.3: deadbeef
foo-darwin-amd64-1.2.3: deadbeef
Expand Down