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

Commit 154c45c

Browse files
author
Jean-Christophe Sirot
committed
Make render command takes exactly one argument which is an App image name. Rendering a .dockerapp dir is not allowed anymore
Signed-off-by: Jean-Christophe Sirot <[email protected]>
1 parent cbf819c commit 154c45c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/commands/render.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ func renderCmd(dockerCli command.Cli) *cobra.Command {
2828
Use: "render [OPTIONS] APP_IMAGE",
2929
Short: "Render the Compose file for an App image",
3030
Example: `$ docker app render myrepo/myapp:1.0.0 --set key=value --parameters-file myparam.yml`,
31-
Args: cli.RequiresMaxArgs(1),
31+
Args: cli.ExactArgs(1),
3232
Hidden: true,
3333
RunE: func(cmd *cobra.Command, args []string) error {
34-
return runRender(dockerCli, firstOrEmpty(args), opts)
34+
return runRender(dockerCli, args[0], opts)
3535
},
3636
}
3737
opts.parametersOptions.addFlags(cmd.Flags())
@@ -75,11 +75,11 @@ func prepareCustomAction(actionName string, dockerCli command.Cli, appname strin
7575
if err != nil {
7676
return nil, nil, nil, err
7777
}
78-
bundle, ref, err := cnab.ResolveBundle(dockerCli, bundleStore, appname)
78+
bundle, ref, err := cnab.GetBundle(dockerCli, bundleStore, appname)
7979
if err != nil {
8080
return nil, nil, nil, err
8181
}
82-
installation, err := appstore.NewInstallation("custom-action", ref)
82+
installation, err := appstore.NewInstallation("custom-action", ref.String())
8383
if err != nil {
8484
return nil, nil, nil, err
8585
}

0 commit comments

Comments
 (0)