如何解决默认的 Cygwin 安装目录是否更改为 C:\tools\cygwin?
docs say 是 C:\cygwin
,但我观察到 C:\tools\cygwin
。
我正在使用 Chocolatey 测试安装,但我之前可能安装了 Cygwin,不记得是否更改了默认位置。我试图删除注册表中所有出现的 C:\tools
,但到目前为止重新安装仍然坚持在那里安装。
解决方法
看起来像Chocolatey sets this location:
$cygwin_root = (Get-ItemProperty 'HKLM:\SOFTWARE\Cygwin\setup' -ea 0).rootdir
if (!$cygwin_root) {
$cygwin_root = if ($pp.InstallDir) { $pp.InstallDir } else { "$toolsLocation\cygwin" }
} else { Write-Host 'Existing installation detected,ignoring InstallDir argument' }
但是不使用默认位置的原因是什么?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。