Skip to content

Commit

Permalink
fix: add persistent flags to root finch command
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun Raja Yogidas <[email protected]>
  • Loading branch information
coderbirju committed Oct 29, 2024
1 parent c8038db commit 85a66c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/finch/main_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ var newApp = func(
// TODO: Decide when to forward --debug to the dependencies
// (e.g. nerdctl for container commands and limactl for VM commands).
rootCmd.PersistentFlags().Bool("debug", false, "running under debug mode")
rootCmd.PersistentFlags().String("namespace", "", `containerd namespace, such as "moby" for Docker, "k8s.io" for Kubernetes`)
rootCmd.PersistentFlags().String("cgroup-manager", "", `Cgroup manager to use ("cgroupfs"|"systemd")`)
rootCmd.PersistentFlags().String("snapshotter", "", "containerd snapshotter")
rootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) error {
// running commands under debug mode will print out debug logs
debugMode, _ := cmd.Flags().GetBool("debug")
Expand Down
3 changes: 3 additions & 0 deletions cmd/finch/main_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ var newApp = func(
// TODO: Decide when to forward --debug to the dependencies
// (e.g. nerdctl for container commands and limactl for VM commands).
rootCmd.PersistentFlags().Bool("debug", false, "running under debug mode")
rootCmd.PersistentFlags().String("namespace", "", `containerd namespace, such as "moby" for Docker, "k8s.io" for Kubernetes`)
rootCmd.PersistentFlags().String("cgroup-manager", "", `Cgroup manager to use ("cgroupfs"|"systemd")`)
rootCmd.PersistentFlags().String("snapshotter", "", "containerd snapshotter")
rootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) error {
// running commands under debug mode will print out debug logs
debugMode, _ := cmd.Flags().GetBool("debug")
Expand Down

0 comments on commit 85a66c0

Please sign in to comment.