Skip to content

Powershell one-line install on Windows 11 error - "You cannot call a method on a null-valued expression" #3749

@pmolodo

Description

@pmolodo

Describe the bug

I did a fresh install of Windows 11, and one of the first things I did on it was try to install chezmoi.

I followed the install docs to install via a Powershell one liner, and ran this:

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

Unfortunately, it returned this error:

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

To reproduce

See above. I was on a fresh install but it was a company managed Windows 11, so it's not at completely generic / stock settings.

Expected behavior

Chezmoi should download + install.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows onlyThis only affects Windows

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions