Fix docker being seen as WSL when run inside WSL, fixes #10094
parent
4bcd860b65
commit
6179f33c74
|
@ -108,7 +108,12 @@ class Platform
|
|||
return self::$isWindowsSubsystemForLinux = false;
|
||||
}
|
||||
|
||||
if (!ini_get('open_basedir') && is_readable('/proc/version') && false !== stripos(Silencer::call('file_get_contents', '/proc/version'), 'microsoft')) {
|
||||
if (
|
||||
!ini_get('open_basedir')
|
||||
&& is_readable('/proc/version')
|
||||
&& false !== stripos(Silencer::call('file_get_contents', '/proc/version'), 'microsoft')
|
||||
&& !file_exists('/.dockerenv') // docker running inside WSL should not be seen as WSL
|
||||
) {
|
||||
return self::$isWindowsSubsystemForLinux = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue