Skip to content

Commit

Permalink
fix: fix os args param in cmd.Run
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Hemming committed Jul 21, 2021
1 parent 191a931 commit 1a343e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"mode": "auto",
"program": "${workspaceRoot}",
"args": [
"launch", "--config", "aaa/main.yml", "cicommit"
"launch", "--param", "test=1"

]
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type (
// Run executes the command line interface to the app. The passed ctx is used to cancel long running tasks.
// appName is the name of the application and forms the suffix of the dot config file.
func Run(ctx context.Context) int {
return runWithArgs(ctx, os.Args)
return runWithArgs(ctx, os.Args[1:])
}

func runWithArgs(ctx context.Context, args []string) int {
Expand Down

0 comments on commit 1a343e7

Please sign in to comment.