fix building from git url without a protocol
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>v0.8
parent
8c7c5269df
commit
a6baa678ea
|
@ -254,6 +254,9 @@ func Git(remote, ref string, opts ...GitOption) State {
|
|||
remote = parts[0] + "/" + parts[1]
|
||||
}
|
||||
}
|
||||
if protocolType == gitProtocolUnknown {
|
||||
url = "https://" + url
|
||||
}
|
||||
|
||||
id := remote
|
||||
|
||||
|
|
|
@ -102,6 +102,9 @@ func FromLLB(op *pb.Op_Source, platform *pb.Platform) (Identifier, error) {
|
|||
id.KeepGitDir = true
|
||||
}
|
||||
case pb.AttrFullRemoteURL:
|
||||
if !isGitTransport(v) {
|
||||
v = "https://" + v
|
||||
}
|
||||
id.Remote = v
|
||||
case pb.AttrAuthHeaderSecret:
|
||||
id.AuthHeaderSecret = v
|
||||
|
|
Loading…
Reference in New Issue