Skip to content

Commit

Permalink
fix: disable setup() function when options.setupTimeout is 0s in script
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukasaI committed Aug 16, 2024
1 parent 664a826 commit 9cc1b41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,10 @@ func (o Options) Apply(opts Options) Options {
if opts.NoSetup.Valid {
o.NoSetup = opts.NoSetup
}
if opts.SetupTimeout.Valid {
// Run setup() before any executors, if it's not disabled.
// When SetupTimeout is 0, setuo() is disabled.

if opts.SetupTimeout.Valid && opts.SetupTimeout.Duration != 0 {
o.SetupTimeout = opts.SetupTimeout
}
if opts.NoTeardown.Valid {
Expand Down

0 comments on commit 9cc1b41

Please sign in to comment.