fix(cli): resolve PR review feedback and improve command execution

This commit is contained in:
Thomas Camlong committed 2026-08-21 17:01:29 +02:00
1 parent 7c4c1ffbe7
commit c8df2fbe5f
14 files changed
+149 -42

No files matched your search

+8 -1
View File
@@ -5,6 +5,7 @@ package cli
import (
"fmt"
"os"
"github.com/spf13/cobra"
@@ -36,7 +37,13 @@ func NewApp() *App {
// Execute runs the CLI.
func Execute() error {
return NewApp().Root().Execute()
args := os.Args[1:]
if len(args) > 0 && args[0] == "--" {
args = args[1:]
}
root := NewApp().Root()
root.SetArgs(args)
return root.Execute()
}
func (a *App) Root() *cobra.Command {