fix(cli): resolve PR review feedback and improve command execution
This commit is contained in:
14 files changed
+149
-42
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user