@@ -40,28 +40,28 @@ function buildImage(dockerFile) {
4040 * @return {string } The bind path.
4141 */
4242function getBindPath ( servicePath ) {
43- // Determine os platform of docker CLI from 'docker version'
44- const options = [ 'version' , '--format' , '{{with .Client}}{{.Os}}{{end}}' ] ;
45- const ps = dockerCommand ( options ) ;
46- const cliPlatform = ps . stdout . trim ( ) ;
43+ // Determine os platform of docker CLI from 'docker version'
44+ const options = [ 'version' , '--format' , '{{with .Client}}{{.Os}}{{end}}' ] ;
45+ const ps = dockerCommand ( options ) ;
46+ const cliPlatform = ps . stdout . trim ( ) ;
4747
48- // Determine bind path
49- let bindPath ;
50- if ( process . platform === 'win32' ) {
51- bindPath = servicePath . replace ( / \\ ( [ ^ \s ] ) / g, '/$1' ) ;
52- if ( cliPlatform === 'windows' ) {
53- bindPath = bindPath . replace ( / ^ \/ ( \w ) \/ / i, '$1:/' ) ;
54- }
55- } else if ( isWsl ) {
56- bindPath = servicePath . replace ( / ^ \/ m n t \/ / , '/' ) ;
57- if ( cliPlatform === 'windows' ) {
58- bindPath = bindPath . replace ( / ^ \/ ( \w ) \/ / i, '$1:/' ) ;
59- }
60- } else {
61- bindPath = servicePath ;
48+ // Determine bind path
49+ let bindPath ;
50+ if ( process . platform === 'win32' ) {
51+ bindPath = servicePath . replace ( / \\ ( [ ^ \s ] ) / g, '/$1' ) ;
52+ if ( cliPlatform === 'windows' ) {
53+ bindPath = bindPath . replace ( / ^ \/ ( \w ) \/ / i, '$1:/' ) ;
6254 }
55+ } else if ( isWsl ) {
56+ bindPath = servicePath . replace ( / ^ \/ m n t \/ / , '/' ) ;
57+ if ( cliPlatform === 'windows' ) {
58+ bindPath = bindPath . replace ( / ^ \/ ( \w ) \/ / i, '$1:/' ) ;
59+ }
60+ } else {
61+ bindPath = servicePath ;
62+ }
6363
64- return bindPath ;
64+ return bindPath ;
6565} ;
6666
6767module . exports = { buildImage, getBindPath} ;
0 commit comments