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

Commit 252c051

Browse files
committed
App inspect requires exactly one arg
Signed-off-by: Djordje Lukic <[email protected]>
1 parent 3b9a6e3 commit 252c051

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

e2e/commands_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func TestInspectApp(t *testing.T) {
161161
cmd.Dir = dir.Path()
162162
icmd.RunCmd(cmd).Assert(t, icmd.Expected{
163163
ExitCode: 1,
164-
Err: "could not parse '' as a valid reference",
164+
Err: `"docker app inspect" requires exactly 1 argument.`,
165165
})
166166

167167
cmd.Command = dockerCli.Command("app", "build", filepath.Join("testdata", "simple", "simple.dockerapp"), "--tag", "simple-app:1.0.0")

internal/commands/inspect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func inspectCmd(dockerCli command.Cli) *cobra.Command {
2323
Short: "Shows metadata, parameters and a summary of the Compose file for a given application",
2424
Example: `$ docker app inspect my-installed-app
2525
$docker app inspect my-app:1.0.0`,
26-
Args: cli.RequiresMaxArgs(1),
26+
Args: cli.ExactArgs(1),
2727
RunE: func(cmd *cobra.Command, args []string) error {
2828
return runInspect(dockerCli, firstOrEmpty(args), opts)
2929
},

0 commit comments

Comments
 (0)