summaryrefslogtreecommitdiff
path: root/pkg/adapter/runtime.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/adapter/runtime.go')
-rw-r--r--pkg/adapter/runtime.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/adapter/runtime.go b/pkg/adapter/runtime.go
index 03419c0bd..c80d5991e 100644
--- a/pkg/adapter/runtime.go
+++ b/pkg/adapter/runtime.go
@@ -288,7 +288,11 @@ func (r *LocalRuntime) Build(ctx context.Context, c *cliconfig.BuildValues, opti
options.CommonBuildOpts = commonOpts
options.SystemContext = systemContext
- options.Runtime = r.GetOCIRuntimePath()
+ if c.GlobalFlags.Runtime != "" {
+ options.Runtime = c.GlobalFlags.Runtime
+ } else {
+ options.Runtime = r.GetOCIRuntimePath()
+ }
if c.Quiet {
options.ReportWriter = ioutil.Discard