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

Failed to install on some machines with type not found for '[ordered]' #14

Open
peter-sabath opened this issue Aug 2, 2019 · 0 comments

Comments

@peter-sabath
Copy link

I have tried to install nvm.portable on different windows 10 machines. All of them have PS 5.1 and Powershell-Core (6.2.2) installed.

Name                           Value
----                           -----
PSVersion                      6.2.2
PSEdition                      Core
GitCommitId                    6.2.2
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

On some of them there is an Error while running 'C:\ProgramData\chocolatey\lib\nvm.portable\tools\chocolateyinstall.ps1' from using the [ordered] keyword to create an ordered dictionary.
(Line 29 of the install script)

The [ordered] keyword was introduced with PS 3.0 so the installed versions support it. Using $dict = [ordered}@{} works fine when manually entered in the PS.

Since Choco does not spawn a powershell but use an internal host it seems that something goes wrong there.

Any suggestions / registry keys to check / is ordered really needed?

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

No branches or pull requests

1 participant