Skip to content

Commit 962e4a6

Browse files
committed
fix: convertVolumePath overrides resolveVolumePath
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 793684f commit 962e4a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

loader/loader.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,18 +571,18 @@ func LoadService(name string, serviceDict map[string]interface{}, workingDir str
571571
if volume.Type != types.VolumeTypeBind {
572572
continue
573573
}
574-
575574
if volume.Source == "" {
576575
return nil, errors.New(`invalid mount config for type "bind": field Source must not be empty`)
577576
}
578577

579578
if resolvePaths {
580-
serviceConfig.Volumes[i] = resolveVolumePath(volume, workingDir, lookupEnv)
579+
volume = resolveVolumePath(volume, workingDir, lookupEnv)
581580
}
582581

583582
if convertPaths {
584-
serviceConfig.Volumes[i] = convertVolumePath(volume)
583+
volume = convertVolumePath(volume)
585584
}
585+
serviceConfig.Volumes[i] = volume
586586
}
587587

588588
return serviceConfig, nil

0 commit comments

Comments
 (0)