Skip to content

Commit

Permalink
Fixed bug of timeout being hardcoded
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesread committed Jul 12, 2021
1 parent 7dcc62a commit 800598b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func execAction(cfg *config.Config, actualAction *config.ActionButton) *pb.Start
"timeout": actualAction.Timeout,
}).Infof("Found action")

ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(actualAction.Timeout) * time.Second)
defer cancel()

cmd := exec.CommandContext(ctx, "sh", "-c", actualAction.Shell)
Expand Down

0 comments on commit 800598b

Please sign in to comment.