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

Powershell one-line install on Windows 11 error - update script at https://get.chezmoi.io/ps1 #3787

Closed
pmolodo opened this issue May 29, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@pmolodo
Copy link
Contributor

pmolodo commented May 29, 2024

Describe the bug

The one-line powershell install given in the docs is:

iex "&{$(irm 'https://get.chezmoi.io/ps1')}"

Unfortunately, this still does not work on a fresh Windows 11 install, because script at https://get.chezmoi.io/ps1 has not been updated with this fix MR for this issue.

Please upload the updated script to https://get.chezmoi.io/ps1, or else update the docs to use

iex "&{$(irm 'https://raw.githubusercontent.com/twpayne/chezmoi/master/assets/scripts/install.ps1')}"

...instead. Thanks!

To reproduce

See issue 3749 - on a fresh Windows 11 install, open powershell, and run:

iex "&{$(irm 'https://get.chezmoi.io/ps1')}"

You will get this error:

You cannot call a method on a null-valued expression.
At line:1 char:1
+ &{<#
+ ~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Expected behavior

The chezmoi binary should get installed.

@twpayne
Copy link
Owner

twpayne commented May 29, 2024

This bug is #3749, as you identify. The install script is updated when a new version of chezmoi is released. I want to fix #3772 before releasing a new version of chezmoi.

@twpayne twpayne closed this as completed May 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants