Skip to content

Commit

Permalink
fix: remove the first arg when running as a plugin (#2595)
Browse files Browse the repository at this point in the history
  • Loading branch information
knqyf263 committed Jul 26, 2022
1 parent cccfade commit f9c17bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/trivy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func run() error {
if !plugin.IsPredefined(runAsPlugin) {
return xerrors.Errorf("unknown plugin: %s", runAsPlugin)
}
if err := plugin.RunWithArgs(context.Background(), runAsPlugin, os.Args); err != nil {
if err := plugin.RunWithArgs(context.Background(), runAsPlugin, os.Args[1:]); err != nil {
return xerrors.Errorf("plugin error: %w", err)
}
return nil
Expand Down

0 comments on commit f9c17bd

Please sign in to comment.