Nic*_*nto 8 git powershell posh-git
我有一个旧版本的posh-git,我想更新(试图解决慢速PowerShell启动时)
我已经拉从回购最新,当我试图做.\install.ps1
我得到
It seems posh-git is already installed...
Run Code Online (Sandbox Code Playgroud)
我如何更新posh-git?
它所做的就是查看脚本是否来自您的个人资料:
$profileLine = ". '$installDir\profile.example.ps1'"
if(Select-String -Path $PROFILE -Pattern $profileLine -Quiet -SimpleMatch) {
Write-Host "It seems posh-git is already installed..."
return
}
Run Code Online (Sandbox Code Playgroud)
由于它似乎将installDir作为运行安装脚本的文件夹,因此仅使用较新版本的posh-git升级文件夹应该已经更新了文件.
如果您对此不满意,只需删除profile.example.ps1
您的配置文件中的源代码并再次运行安装:)