mirror of
https://github.com/containers/podman.git
synced 2025-11-29 01:28:22 +08:00
Quadlet build - consider File path that starts with a systemd specifier as absolute
Fixes https://github.com/containers/podman/issues/26746 Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
This commit is contained in:
@@ -1428,7 +1428,7 @@ func ConvertBuild(build *parser.UnitFile, unitsInfoMap map[string]*UnitInfo, isU
|
||||
// Context or WorkingDirectory has to be last argument
|
||||
if len(context) > 0 {
|
||||
podman.add(context)
|
||||
} else if !filepath.IsAbs(filePath) && !isURL(filePath) {
|
||||
} else if !startsWithSystemdSpecifier(filePath) && !filepath.IsAbs(filePath) && !isURL(filePath) {
|
||||
// Special handling for relative filePaths
|
||||
if len(workingDirectory) == 0 {
|
||||
return nil, warnings, fmt.Errorf("relative path in File key requires SetWorkingDirectory key to be set")
|
||||
|
||||
Reference in New Issue
Block a user