bake: fix protocol detection

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
pull/822/head
CrazyMax 3 years ago
parent 49342dd54d
commit 82b212bddf
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

@ -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) { 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 { if !ok {
st, ok = detectGitContext(url) st, filename, ok = detectHTTPContext(url)
if !ok { if !ok {
return nil, nil, errors.Errorf("not url context") return nil, nil, errors.Errorf("not url context")
} }

Loading…
Cancel
Save