From 556c71bb0e3066dab053829a5d5e38885e6bd255 Mon Sep 17 00:00:00 2001 From: jeff-901 Date: Fri, 5 Aug 2022 09:34:16 +0800 Subject: [PATCH] filename logic --- pkg/cmd/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go index 428e980..8cdb899 100644 --- a/pkg/cmd/run.go +++ b/pkg/cmd/run.go @@ -261,7 +261,7 @@ func (o *RunOptions) Validate(cmd *cobra.Command, args []string) error { if (evalDefined && filenameDefined) || (evalDefined && programDefined) || (filenameDefined && programDefined) { return fmt.Errorf(bpftraceDoubleErrString) } - if (evalDefined && len(o.eval) == 0) || (filenameDefined && len(o.program) == 0) || (programDefined && len(o.program) == 0) { + if (evalDefined && len(o.eval) == 0) || (filenameDefined && len(o.filename) == 0) || (programDefined && len(o.program) == 0) { return fmt.Errorf(bpftraceEmptyErrString) } default: