Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 2cdb76e

Browse files
committed
Pass the first arg directly
Cobra makes sure that it's thee Signed-off-by: Djordje Lukic <[email protected]>
1 parent bf19941 commit 2cdb76e

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pipeline {
107107
sh 'docker load -i coverage-invocation-image.tar'
108108
}
109109
ansiColor('xterm') {
110-
sh 'make -f docker.Makefile TAG=$TAG-coverage coverage-run || true'
110+
sh 'make -f docker.Makefile TAG=$TAG-coverage coverage-run'
111111
sh 'make -f docker.Makefile TAG=$TAG-coverage coverage-results'
112112
}
113113
archiveArtifacts '_build/ci-cov/all.out'

Jenkinsfile.baguette

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pipeline {
129129
sh 'docker load -i coverage-invocation-image.tar'
130130
}
131131
ansiColor('xterm') {
132-
sh 'make -f docker.Makefile TAG=$TAG-coverage coverage-run || true'
132+
sh 'make -f docker.Makefile TAG=$TAG-coverage coverage-run'
133133
sh 'make -f docker.Makefile TAG=$TAG-coverage coverage-results'
134134
}
135135
archiveArtifacts '_build/ci-cov/all.out'

internal/commands/image/inspect.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ type inspectOptions struct {
1818
pretty bool
1919
}
2020

21-
func firstOrEmpty(list []string) string {
22-
if len(list) != 0 {
23-
return list[0]
24-
}
25-
return ""
26-
}
27-
2821
func muteDockerCli(dockerCli command.Cli) func() {
2922
stdout := dockerCli.Out()
3023
stderr := dockerCli.Err()
@@ -43,7 +36,7 @@ func inspectCmd(dockerCli command.Cli) *cobra.Command {
4336
$docker app inspect my-app:1.0.0`,
4437
Args: cli.ExactArgs(1),
4538
RunE: func(cmd *cobra.Command, args []string) error {
46-
return runInspect(dockerCli, firstOrEmpty(args), opts)
39+
return runInspect(dockerCli, args[0], opts)
4740
},
4841
}
4942
cmd.Flags().BoolVar(&opts.pretty, "pretty", false, "Pretty print the output")

0 commit comments

Comments
 (0)