@@ -13,6 +13,7 @@ import (
1313 "github.com/docker/cli/cli"
1414 "github.com/docker/cli/cli/command"
1515 "github.com/docker/cli/cli/config"
16+ "github.com/pkg/errors"
1617 "github.com/spf13/cobra"
1718)
1819
@@ -28,10 +29,10 @@ func renderCmd(dockerCli command.Cli) *cobra.Command {
2829 Use : "render [OPTIONS] APP_IMAGE" ,
2930 Short : "Render the Compose file for an App image" ,
3031 Example : `$ docker app render myrepo/myapp:1.0.0 --set key=value --parameters-file myparam.yml` ,
31- Args : cli .RequiresMaxArgs (1 ),
32+ Args : cli .ExactArgs (1 ),
3233 Hidden : true ,
3334 RunE : func (cmd * cobra.Command , args []string ) error {
34- return runRender (dockerCli , firstOrEmpty ( args ) , opts )
35+ return runRender (dockerCli , args [ 0 ] , opts )
3536 },
3637 }
3738 opts .parametersOptions .addFlags (cmd .Flags ())
@@ -75,11 +76,11 @@ func prepareCustomAction(actionName string, dockerCli command.Cli, appname strin
7576 if err != nil {
7677 return nil , nil , nil , err
7778 }
78- bundle , ref , err := cnab .ResolveBundle (dockerCli , bundleStore , appname )
79+ bundle , ref , err := cnab .GetBundle (dockerCli , bundleStore , appname )
7980 if err != nil {
80- return nil , nil , nil , err
81+ return nil , nil , nil , errors . Wrapf ( err , "could not render %q: no such App image" , appname )
8182 }
82- installation , err := appstore .NewInstallation ("custom-action" , ref )
83+ installation , err := appstore .NewInstallation ("custom-action" , ref . String () )
8384 if err != nil {
8485 return nil , nil , nil , err
8586 }
0 commit comments