From 82b212bddf4b73381303b8afea8680e44a62fb92 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 2 Nov 2021 23:12:21 +0100 Subject: [PATCH] bake: fix protocol detection Signed-off-by: CrazyMax --- bake/remote.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bake/remote.go b/bake/remote.go index 00a3a042..23cb180a 100644 --- a/bake/remote.go +++ b/bake/remote.go @@ -21,9 +21,10 @@ type Input struct { } func ReadRemoteFiles(ctx context.Context, dis []build.DriverInfo, url string, names []string, pw progress.Writer) ([]File, *Input, error) { - st, filename, ok := detectHTTPContext(url) + var filename string + st, ok := detectGitContext(url) if !ok { - st, ok = detectGitContext(url) + st, filename, ok = detectHTTPContext(url) if !ok { return nil, nil, errors.Errorf("not url context") }