Windows path, c:\\my\\path\\shiny, need to be changed to be compatible with the Engine. Volume path are expected to be linux style /c/my/path/shiny/
(volume types.ServiceVolumeConfig)
| 936 | // Windows path, c:\\my\\path\\shiny, need to be changed to be compatible with |
| 937 | // the Engine. Volume path are expected to be linux style /c/my/path/shiny/ |
| 938 | func convertVolumePath(volume types.ServiceVolumeConfig) types.ServiceVolumeConfig { |
| 939 | volumeName := strings.ToLower(filepath.VolumeName(volume.Source)) |
| 940 | if len(volumeName) != 2 { |
| 941 | return volume |
| 942 | } |
| 943 | |
| 944 | convertedSource := fmt.Sprintf("/%c%s", volumeName[0], volume.Source[len(volumeName):]) |
| 945 | convertedSource = strings.ReplaceAll(convertedSource, "\\", "/") |
| 946 | |
| 947 | volume.Source = convertedSource |
| 948 | return volume |
| 949 | } |
no outgoing calls
searching dependent graphs…