Skip to content

Commit b16c82d

Browse files
authored
fix: Address unknown path format error in wsl2 (#667)
1 parent 95c694f commit b16c82d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/docker.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const spawn = require('child-process-ext/spawn');
22
const isWsl = require('is-wsl');
33
const fse = require('fs-extra');
44
const path = require('path');
5+
const os = require('os');
56

67
/**
78
* Helper function to run a docker command
@@ -129,7 +130,8 @@ async function tryBindPath(bindPath, testFile, pluginInstance) {
129130
*/
130131
async function getBindPath(servicePath, pluginInstance) {
131132
// Determine bind path
132-
if (process.platform !== 'win32' && !isWsl) {
133+
let isWsl1 = isWsl && !os.release().includes('microsoft-standard');
134+
if (process.platform !== 'win32' && !isWsl1) {
133135
return servicePath;
134136
}
135137

0 commit comments

Comments
 (0)