Skip to content
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

Chocolatey support for Paket.PowerShell #872

Merged
merged 5 commits into from
Jun 14, 2015
Merged

Conversation

ctaggart
Copy link
Contributor

Testing locally can be done like so:

choco install Paket.PowerShell -s C:\Projects\Paket\temp --pre -y --force

Installing from NuGet can be done like so:

choco install Paket.PowerShell -s http://www.nuget.org/api/v2 -y

Once it is uploaded to or mirrored on Chocolatey, then just this will work:

choco install Paket.PowerShell -y

@forki
Copy link
Member

forki commented Jun 14, 2015

Should we push this to chocolatey during the build?

@ctaggart
Copy link
Contributor Author

I think so. That is what I do for SourceLink.exe. You could also do that same for paket.

forki added a commit that referenced this pull request Jun 14, 2015
Chocolatey support for Paket.PowerShell
@forki forki merged commit c11b7e9 into fsprojects:master Jun 14, 2015
@forki
Copy link
Member

forki commented Jun 14, 2015

cool. It's uploaded to https://chocolatey.org/packages/Paket.PowerShell/1.14.0, but await moderator approval.

@forki
Copy link
Member

forki commented Jun 14, 2015

I'm pretty sure Paket's release cycle will annoy the hell out of the choco guys.

@alexeyzimarev
Copy link

After the installation, it cannot be used in the PS console, like path is not added.

@ctaggart
Copy link
Contributor Author

@alexeyzimarev Are you trying to use it from the Package Manager Console in Visual Studio? Are you able to use it from normal PowerShell? It worked for me with this simple test:

image

Did the path get added correctly to the PSModulePath?

(Get-Item Env:\PSModulePath).Value -Split ';'

image

The PSModulePath allows the module to be imported on demand. If that is not working, are you ale to import it manually?

Import-Module C:\ProgramData\chocolatey\lib\Paket.PowerShell\tools\Paket.PowerShell\Paket.PowerShell.dll -DisableNameChecking

image

@ctaggart
Copy link
Contributor Author

@alexeyzimarev It looks like some output doesn't show up. Is that what you mean? I logged this bug and will look into it. #874

@alexeyzimarev
Copy link

No, for me it was just saying that "Paket" is not a valid command. I tried from the PS shell. Will check the path later.

@alexeyzimarev
Copy link

This is what I got after cinst

PS D:\GitHub\Paket.VisualStudio> (Get-Item Env:\PSModulePath).Value -Split ';'
C:\Windows\system32\WindowsPowerShell\v1.0\Modules
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\

@alexeyzimarev
Copy link

Import gives this:

2015-06-15_12-26-21

@ctaggart
Copy link
Contributor Author

Hi @alexeyzimarev, I'm not sure why you get that error message. Can you provide the output of these commands?

$PSVersionTable
choco --version
choco list --localonly
Get-FileHash C:\ProgramData\chocolatey\lib\Paket.PowerShell\tools\Paket.PowerShell\Paket.PowerShell.dll -Algorithm SHA1 | fl

image

Unless I coded something wrong, C:\ProgramData\chocolatey\lib\Paket.PowerShell\tools should get added to your $PSModulePath. I've tested it on a couple of computers. Start a new PowerShell session after installing.

@ferventcoder
Copy link

@alexeyzimarev did you close and reopen your shell?

@ferventcoder
Copy link

So forcing the import worked for me.

image

@ferventcoder
Copy link

I did notice that you are adding a bunch of unapproved verbs, which might be why it didn't automatically import?

@ferventcoder
Copy link

This might be helpful as well.

image

@ferventcoder
Copy link

Dumb question. Does a module automatically load without a psd1/psm1 file?

@ferventcoder
Copy link

Actually the dumbest possibility, did you need the trailing back slash at the end of your custom module path? http://stackoverflow.com/a/23942543/18475

@ctaggart
Copy link
Contributor Author

@ferventcoder There is not a Paket command. If you open a new PowerShell instance and type Paket- or just pak and hit tab, do you see a list? PowerShell will import it as soon as you try running one of them. If so, the $env:psmodulepath is doing its job. I've now tried successfully on 3 computers.

@ferventcoder
Copy link

I didn't, but this may be helpful

WMF 5 by the way. I added the trailing back slash and
image

@ferventcoder
Copy link

Seems to work without the trailing backslash as well. With Paket- {tab}

@ferventcoder
Copy link

so should be good to approve. :)

@ferventcoder
Copy link

Approved.

With the project owners building the package, we move things to a trusted status after a few good approvals @forki.

@ctaggart
Copy link
Contributor Author

Awesome! Thank you! Sometime this week, I hope to get a blog about how I used F# Chocolatey PowerShell. :-)

@ferventcoder
Copy link

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants