added tests around user volume mounts for prepare job

This commit is contained in:
Nikola Jokic
2022-06-08 11:23:05 +02:00
parent fa680b2073
commit 84a57de2e3
2 changed files with 32 additions and 1 deletions

View File

@@ -52,7 +52,10 @@ export function containerVolumes(
'Volume mounts outside of the work folder are not supported'
)
}
sourceVolumePath = userVolume.sourceVolumePath.slice(workspacePath.length)
// sourcec volume path should be relative path
sourceVolumePath = userVolume.sourceVolumePath.slice(
workspacePath.length + 1
)
} else {
sourceVolumePath = userVolume.sourceVolumePath
}