-
-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't install latest release #381
Comments
Since you are on PS 5.1, you shouldn't need to use Chocolatey. You say you first installed PSGet, but you shouldn't have to do that. PS v5 and higher come with two modules: PackageManagement (manager of pkg managers) and PowerShellGet. The latter supersedes the need for the older, community created PSGet. If posh-git did get installed into
Also check for the existence of the following file:
If that file doesn't exist, then you probably installed with the old PSGet. If it exists, then it was installed with PowerShellGet - which means you can use OK, so if the above import worked but "Import-Module posh-git" does not work, it means your PSModulePath environment variable is borked. Output its value with
Note that it is the existence of RE version 0.7.0, you have a pre-release of 0.7.0. When 0.7.0 releases (shortly - hopefully) you will need to remove that version and then install the released version from the PSGallery. |
Hi, I was having the exact same problem when I found out this issue report (I didn't know not to use chocolatey for installation). Then I followed your readme.md.
The My PSversion:
git version: 2.11.0.windows.3 OSVersion:
PS: In your readme, you mention a command
|
We haven't release 0.7.0 to the PSGallery yet. You won't see the prompt change on import until 0.7.0 releases. Hopefully in the coming week (or two). In the mean time execute function prompt {
$origLastExitCode = $LASTEXITCODE
Write-Host $ExecutionContext.SessionState.Path.CurrentLocation -NoNewline
Write-VcsStatus
$LASTEXITCODE = $origLastExitCode
"$('>' * ($nestedPromptLevel + 1)) "
}
Import-Module posh-git Once 0.7.0 comes out and you run |
@rkeithhill Thank you for the prompt response. It works after applying your suggestion. |
@dahlbyk :-( indeed. What can I help with (later tonight)? |
Sorry for hijacking the thread. In my setup, the |
@ownmaster @canpolat I just tested a clean
|
@dahlbyk I'm on a different PC now but I'm pretty sure my chocolatey version was 0.10.3. |
If anyone cares to dig into this, I pushed a preview release of 0.7 and Chocolatey package verification failed with this same error: #358 (comment). |
Here's the specific error:
|
I did not expect so many posts here, but will try to make everything clear :) I never said I first installed PsGet. If talking about order:
I know what PsGet is, but that was the only way that worked in my situation. Now, I removed working posh-git and PsGet and tried again
|
@ownmaster did you try the suggestion at: #381 (comment) I had the same problem and following @rkeithhill's comment solved it for me. |
Import won't give any result if the module imports without problems. That's just how PowerShellGet\Import-Module works. However, once 0.7.0 releases, importing posh-git should change the default prompt function to display Git status summary info when in a Git repo. However, if you already have a prompt function defined in your PowerShell profile, posh-git will not modify the prompt. |
New error! 😡 Suppose I should upgrade Chocolatey so I can reproduce locally. https://gist.github.com/choco-bot/a36989a10a30e911ac05694c5c6f5136
|
Nothing was defined in my profile. I supposed that profile should be modified automatically during install. Copied and modified profile posh-git configuration from another PC, now I have modified prompt. |
It used to (see #383). Still trying to get back to the point where that works again. |
#383 title says about choco. What about native PowerShell installation methods, did they also break at some point? |
@ownmaster The native PowerShell installation method has not been updated to 0.7.0. It is still installing 0.6.1.20160330 (released last year). Once a new user has installed 0.7.0 via the PowerShellGet\Install-Module (or Update-Module) command, they only need to run |
🆗 I think I have everything cleared up. If anyone here still wants to use Chocolatey, try this:
|
@dahlbyk using choco install poshgit --version=0.7.0-pre4 worked like a charm. I was previously getting the "Cannot bind arguement to parameter 'LiteralPath'... error. Thank you. |
@dahlbyk how to load posh-git after 0.7.0-pre4 installation via choco? |
Executing |
Yeah, forgot that module is installed into location which is not in PowerShell paths list. Added it manually. BTW, when 0.7.0 is initially loaded it shows prompt as |
Yes and that is something that is currently under discussion at #386. Basically, since the posh-git provided prompt is a single line - with a lot of info to potentially display - we substitute |
@ownmaster Do you consider this issue fixed - considering you can only install the latest pre-release from Chocolatey ATM? |
I did not have access to that PC yesterday. Today, I tryied the 0.7.0-pre4 version and the installation wen thru. Thank you for the quick response. |
0.7.0 is Coming Soon, but I went ahead and pulled the important bits from #358 into |
@rkeithhill I guess yes, it is fixed - now I can install. :) I hope in 0.7.? release it will be added to profile automagically after setup. |
If using Chocolatey, yes. But no if using PowerShellGet\Install-Module. The latter just downloads, unzips and copies the bits to the specified Modules folder - nothing more. |
We started down the automagical path with #361, but couldn't reliably decide if we should add to profile or not. We ended up with the deterministic |
Hi,
I can't install posh-git via choco or
install-package/install-module
.When I install using
install-package
orinstall-module
posh-git gets installed (I can see it in 'modules' folder), butimport-module posh-git
doesn't bring it.If I install using choco setup fails:
I only managed to install it by first installing PsGet and then running
install-module
, then manually adddingimport-module
to profile. But in this case I've got version 0.7.0.System info:
The text was updated successfully, but these errors were encountered: