Skip to content

Commit 504e761

Browse files
committed
Early switch for binary provisioning
1 parent ab61f4e commit 504e761

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

cmd/execute.go

+13-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,17 @@ import (
1212
// It only is exported here for backwards compatibility and the ability to use xk6 to build extended k6
1313
func Execute() {
1414
gs := state.NewGlobalState(context.Background())
15-
internalcmd.NewLauncher(gs).Launch()
15+
16+
if gs.Flags.BinaryProvisioning {
17+
internalcmd.NewLauncher(gs).Launch()
18+
return
19+
}
20+
21+
// If Binary Provisioning is not enabled, continue with the regular k6 execution path
22+
23+
// TODO: this is temporary defensive programming
24+
// The Launcher has already the support for this specific execution path, but we decided to play safe here.
25+
// After the v1.0 release, we want to fully delegate this control to the Launcher.
26+
gs.Logger.Debug("Binary Provisioning feature is disabled.")
27+
internalcmd.ExecuteWithGlobalState(gs)
1628
}

0 commit comments

Comments
 (0)