mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-17 08:57:07 +08:00
bump compose-go to v2.4.9
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:

committed by
CrazyMax

parent
00fdcd38ab
commit
bf95aa3dfa
24
vendor/github.com/compose-spec/compose-go/v2/loader/paths.go
generated
vendored
24
vendor/github.com/compose-spec/compose-go/v2/loader/paths.go
generated
vendored
@ -17,9 +17,7 @@
|
||||
package loader
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/compose-spec/compose-go/v2/types"
|
||||
)
|
||||
@ -40,17 +38,6 @@ func ResolveRelativePaths(project *types.Project) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func absPath(workingDir string, filePath string) string {
|
||||
if strings.HasPrefix(filePath, "~") {
|
||||
home, _ := os.UserHomeDir()
|
||||
return filepath.Join(home, filePath[1:])
|
||||
}
|
||||
if filepath.IsAbs(filePath) {
|
||||
return filePath
|
||||
}
|
||||
return filepath.Join(workingDir, filePath)
|
||||
}
|
||||
|
||||
func absComposeFiles(composeFiles []string) ([]string, error) {
|
||||
for i, composeFile := range composeFiles {
|
||||
absComposefile, err := filepath.Abs(composeFile)
|
||||
@ -61,14 +48,3 @@ func absComposeFiles(composeFiles []string) ([]string, error) {
|
||||
}
|
||||
return composeFiles, nil
|
||||
}
|
||||
|
||||
func resolvePaths(basePath string, in types.StringList) types.StringList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make(types.StringList, len(in))
|
||||
for i := range in {
|
||||
ret[i] = absPath(basePath, in[i])
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
Reference in New Issue
Block a user