mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
build: fixup resolvePaths for remote context path
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
@ -670,9 +670,11 @@ func dockerUlimitToControllerUlimit(u *dockeropts.UlimitOpt) *controllerapi.Ulim
|
||||
// and replaces them to absolute paths.
|
||||
func resolvePaths(options *controllerapi.BuildOptions) (_ *controllerapi.BuildOptions, err error) {
|
||||
if options.ContextPath != "" && options.ContextPath != "-" {
|
||||
options.ContextPath, err = filepath.Abs(options.ContextPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if !urlutil.IsGitURL(options.ContextPath) && !urlutil.IsURL(options.ContextPath) {
|
||||
options.ContextPath, err = filepath.Abs(options.ContextPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
if options.DockerfileName != "" && options.DockerfileName != "-" {
|
||||
|
Reference in New Issue
Block a user