Skip to content

Commit

Permalink
Update cobra args to fit with new api
Browse files Browse the repository at this point in the history
Signed-off-by: David Freilich <david.freilich@appsflyer.com>
  • Loading branch information
dfreilich committed Nov 3, 2022
1 parent c022883 commit 0140c7d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/commands/buildpack_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func BuildpackNew(logger logging.Logger, creator BuildpackCreator) *cobra.Comman
cmd := &cobra.Command{
Use: "new <id>",
Short: "Creates basic scaffolding of a buildpack.",
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Example: "pack buildpack new sample/my-buildpack",
Long: "buildpack new generates the basic scaffolding of a buildpack repository. It creates a new directory `name` in the current directory (or at `path`, if passed as a flag), and initializes a buildpack.toml, and two executable bash scripts, `bin/detect` and `bin/build`. ",
RunE: logError(logger, func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/buildpack_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func BuildpackPackage(logger logging.Logger, cfg config.Config, packager Buildpa
cmd := &cobra.Command{
Use: "package <name> --config <config-path>",
Short: "Package a buildpack in OCI format.",
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Example: "pack buildpack package my-buildpack --config ./package.toml\npack buildpack package my-buildpack.cnb --config ./package.toml --f file",
Long: "buildpack package allows users to package (a) buildpack(s) into OCI format, which can then to be hosted in " +
"image repositories or persisted on disk as a '.cnb' file. You can also package a number of buildpacks " +
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/package_buildpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func PackageBuildpack(logger logging.Logger, cfg config.Config, packager Buildpa
cmd := &cobra.Command{
Use: `package-buildpack <name> --config <package-config-path>`,
Hidden: true,
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Short: "Package buildpack in OCI format.",
Example: "pack package-buildpack my-buildpack --config ./package.toml",
Long: "package-buildpack allows users to package (a) buildpack(s) into OCI format, which can then to be hosted in " +
Expand Down

0 comments on commit 0140c7d

Please sign in to comment.