Skip to content

Conversation

@dingxiangfei2009
Copy link

@dingxiangfei2009 dingxiangfei2009 commented Jun 22, 2025

Description

This has happened on fresh installs of scoop:

Invoke-Get: The expression after '&' in a pipeline element produced an object that was not valid. It must result in command name, a script block or a CommandInfo object.
At ....\buckets.ps1
+...     $remote = Invoke-Get -Path $bucket_path -ArgumentList @('config', '..

Apparently the path contains & character, which is interpreted by Powershell as a command call. We should quote all paths into one argument, as opposed to letting Powershell special character to slip in to corrupt the control flow.

Motivation and Context

There is no ticket yet to describe the fault. It has appeared that on WIndows Server 2025, the initial installation consistently fails.

How Has This Been Tested?

I have rebuilt the scoop on Windows Server 2025 and retried a few installations.

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

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.

1 participant