Skip to content

Commit 7b799d0

Browse files
author
Italo Santos
authored
fix: add event arg and validate pgrep (#45)
1 parent 4e1c4d5 commit 7b799d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/cmd/kubernetes/job/python.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ func (p *pythonCreator) create(targetPod *apiv1.Pod, cfg *data.FlameConfig) (str
2424
cfg.TargetConfig.ContainerId,
2525
cfg.TargetConfig.Duration.String(),
2626
string(cfg.TargetConfig.Language),
27-
cfg.TargetConfig.Pgrep,
27+
string(cfg.TargetConfig.Event),
28+
}
29+
30+
if cfg.TargetConfig.Pgrep != "" {
31+
args = append(args, cfg.TargetConfig.Pgrep)
2832
}
2933

3034
if cfg.TargetConfig.Image != "" {

0 commit comments

Comments
 (0)