Skip to content

Commit

Permalink
make sure local file path is handled correctly for docker compose lon…
Browse files Browse the repository at this point in the history
…g syntax as well
  • Loading branch information
t83714 committed Apr 15, 2022
1 parent 75715a6 commit 34d8fac
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/servicesTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,19 @@ module.exports = {
} else {
var volumestr = '';
if (volume.source && volume.target) {
volumestr +=
projectName + '_' + volume.source + ':' + volume.target + ':';
if (
volume.source.substring(0, 2) === './' ||
volume.source.substring(0, 3) === '../' ||
volume.source[0] === '/'
) {
volumestr += standardizeVolumeStr(
volume.source + ':' + volume.target,
cwd
);
} else {
volumestr +=
projectName + '_' + volume.source + ':' + volume.target + ':';
}
}
if (volume.read_only || type == 'ro') {
volumestr += 'ro,';
Expand Down

0 comments on commit 34d8fac

Please sign in to comment.