Boo to the Chocolatey Gods

此生再无相见时 提交于 2019-12-23 07:52:31

问题


Update:

This utility is to help configure Git through a certified Microsoft Visual Academy (MVA) video that I was going through.

I receive a peculiar error when I install packages through Chocolatey.

  • I've uploaded Command Prompt
  • Pointed directory to Chocolatey Bin Directory
  • Attempt to install via cinst poshgit

It downloads and appears as if it is working, it even creates the directory under C:\Tools\Poshgit. Then it gives me the following:

[Error] Cannot bind arguement to parameter 'Path' because it is an empty string. At C:\Chocolatey\ChocolateyInstall\Helpers\functions\Writer-ChocolateyFailure.ps1:30 char 2

Which resulted in a failure, I'm not entirely sure why either. It is a fresh install of Chocolatey. Am I doing something wrong?


回答1:


So installing Git and Posh-Git hasn't been too pleasant, how I fixed the error was by reinstalling Chocolatey, then doing the following:

@Powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

I know it is a tedious command, but I reinstalled with the above then did the following through Power Shell (Ran as Administrator).

Set-ExecutionPolicy RemoteSigned
cinst poshgit 

That didn't fully resolve as there were reminents of the previous failure, so I did:

cinst poshgit -force
cinst git.install -force
git

Once I typed git I had access to the git commands and was able to:

git config --global user.name "Your Name"
git config --global user.email "Your Email"
cinst git-credential-winstore

Without any additional problems, the issue derived from the Command-Line install, should of just started with Power Shell.



来源:https://stackoverflow.com/questions/23434344/boo-to-the-chocolatey-gods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!