From d37c26492fff379872af97c9deb26bcb49a07aee Mon Sep 17 00:00:00 2001 From: Amir Szekely Date: Wed, 20 Jun 2018 16:09:26 -0700 Subject: [PATCH] Reorder `bindPaths` for faster detection --- lib/docker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/docker.js b/lib/docker.js index 4b914942..ddfababc 100644 --- a/lib/docker.js +++ b/lib/docker.js @@ -92,11 +92,12 @@ function getBindPath(servicePath) { throw new Error(`Unknown path format ${baseBindPath.substr(10)}...`); } - bindPaths.push(`/${drive.toLowerCase()}/${path}`); + bindPaths.push(`/${drive.toLowerCase()}/${path}`); // Docker Toolbox (seems like Docker for Windows can support this too) + bindPaths.push(`${drive.toLowerCase()}:/${path}`); // Docker for Windows + // other options just in case bindPaths.push(`/${drive.toUpperCase()}/${path}`); bindPaths.push(`/mnt/${drive.toLowerCase()}/${path}`); bindPaths.push(`/mnt/${drive.toUpperCase()}/${path}`); - bindPaths.push(`${drive.toLowerCase()}:/${path}`); bindPaths.push(`${drive.toUpperCase()}:/${path}`); for (let i = 0; i < bindPaths.length; i++) {