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:
Ygal Blum
2025-09-09 10:25:17 -04:00
parent 8900d8e77b
commit 936a01e088
3 changed files with 5 additions and 1 deletions

View File

@@ -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")