-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bib: make build the default subcommand
Prior this commit, the bootc-image-builder container image had a custom entrypoint that hardcoded the use of the build subcommand. This meant that if a user wanted to use a different subcommand, they had to overwrite the entrypoint. This commit changes the cobra code in bib to fallback to build if no subcommand was given. This is slighly ugly, but it allows us to remove the custom entrypoint, streamlining the use of subcommands. Let's see an example of calling the version subcommand: Before: podman run --rm -it --entrypoint=/usr/bin/bootc-image-builder \ quay.io/centos-bootc/bootc-image-builder:latest version After: sudo podman run --rm -it \ quay.io/centos-bootc/bootc-image-builder:latest version Kudos to https://github.com/IKukhta for his code from spf13/cobra#823 (comment)
- Loading branch information
1 parent
835e064
commit 1a79b1d
Showing
7 changed files
with
16 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters