Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Commit

Permalink
Pass the first arg directly
Browse files Browse the repository at this point in the history
Cobra makes sure that it's thee

Signed-off-by: Djordje Lukic <[email protected]>
  • Loading branch information
rumpl committed Oct 18, 2019
1 parent bf19941 commit a91eb40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile.baguette
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pipeline {
sh 'docker load -i coverage-invocation-image.tar'
}
ansiColor('xterm') {
sh 'make -f docker.Makefile TAG=$TAG-coverage coverage-run || true'
sh 'make -f docker.Makefile TAG=$TAG-coverage coverage-run'
sh 'make -f docker.Makefile TAG=$TAG-coverage coverage-results'
}
archiveArtifacts '_build/ci-cov/all.out'
Expand Down
9 changes: 1 addition & 8 deletions internal/commands/image/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ type inspectOptions struct {
pretty bool
}

func firstOrEmpty(list []string) string {
if len(list) != 0 {
return list[0]
}
return ""
}

func muteDockerCli(dockerCli command.Cli) func() {
stdout := dockerCli.Out()
stderr := dockerCli.Err()
Expand All @@ -43,7 +36,7 @@ func inspectCmd(dockerCli command.Cli) *cobra.Command {
$docker app inspect my-app:1.0.0`,
Args: cli.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
return runInspect(dockerCli, firstOrEmpty(args), opts)
return runInspect(dockerCli, args[0], opts)
},
}
cmd.Flags().BoolVar(&opts.pretty, "pretty", false, "Pretty print the output")
Expand Down

0 comments on commit a91eb40

Please sign in to comment.