Skip to content

Instantly share code, notes, and snippets.

@metathrone
Last active February 9, 2023 02:28
Show Gist options
  • Save metathrone/015cf0c69750ff857cedd11d4429c9b6 to your computer and use it in GitHub Desktop.
Save metathrone/015cf0c69750ff857cedd11d4429c9b6 to your computer and use it in GitHub Desktop.
修改wsl2下拼接windows环境变量导致命令执行失败
# 在 WSL 2 中默认可获取到宿主机中的环境变量,这可能会导致某些错误,比如获取到一些没有意义的环境变量,导致环境混乱
# 若要禁止在 WSL 2 中访问 Windows 环境变量
echo -e "[intertop]\nappendWindowsPath=false" | sudo tee -a /etc/wsl.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment