From 04d333f0efd0d1af78785c76ed357f0fa98cafa1 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 13 Aug 2019 14:33:57 +0200 Subject: runtime: honor --runtime flag to build Signed-off-by: Giuseppe Scrivano --- pkg/adapter/runtime.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/adapter/runtime.go') 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 -- cgit v1.2.3-54-g00ecf