浏览代码

wsl: Fix the problem of incorrect identification of WSL

Thiasap 3 年之前
父节点
当前提交
9dfe51c5ed
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      package/linux/install

+ 1 - 1
package/linux/install

@@ -187,7 +187,7 @@ init_dir()
 	which systemctl >/dev/null 2>&1
 	ISSYSTEMD="$?"
 	# Running under WSL (Windows Subsystem for Linux)?
-	cat /proc/version | grep Microsoft >/dev/null 2>&1; 
+	cat /proc/version | grep -E '[Mm]icrosoft' >/dev/null 2>&1; 
 	if [ $? -eq 0 ]; then
 		ISSYSTEMD=1
 		ISWSL=0