Skip to content

Commit 6f956d6

Browse files
committed
fix: apply env and run command defect
1 parent 60a147d commit 6f956d6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

internal/command/apply.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,10 @@ func (c *ApplyCommand) Run(cmd *cobra.Command, args []string) error {
8787
envOrSheetName := args[0]
8888
var commandArgs []string
8989

90-
// Find the separator "--" and split command args
91-
for i, arg := range args {
92-
if arg == "--" {
93-
if i+1 < len(args) {
94-
commandArgs = args[i+1:]
95-
}
90+
// Get all original arguments from os.Args
91+
for i, arg := range os.Args {
92+
if arg == "--" && i < len(os.Args)-1 {
93+
commandArgs = os.Args[i+1:]
9694
break
9795
}
9896
}

0 commit comments

Comments
 (0)