mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-19 01:47:43 +08:00
Merge pull request #822 from crazy-max/fix-bake-git-protoc
bake: fix protocol detection
This commit is contained in:
commit
7f0e37531c
@ -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…
x
Reference in New Issue
Block a user