Skip to content

Goose on Windows: PowerShell Command Arguments Incorrectly Wrapped in Script Content #3004

@GaryZhous

Description

@GaryZhous

Goose fails to run powershell commands!

Steps to reproduce the bug:

  1. Open Goose desktop on your Windows computer.
  2. Ask it to do some scripting such as list all the files in the current directory.
  3. Tada you have the error

Image

Trouble-shooting

I let Goose self-diagnose this situation and it turns out that those PowerShell profile parameters are being incorrectly included in the script content instead of being passed as separate arguments. This causes all commands to fail with a "-NoProfile is not recognized as a cmdlet" error.

Image

Image

Therefore instead of this: powershell -NoProfile -NonInteractive -Command "dir", we are getting this: powershell "-NoProfile -NonInteractive -Command { dir }", those params are treated as command strings so PowerShell fails to execute the dir command properly.

PS

I think this code right here is causing the problem:

Image
Maybe the params are not set up properly?

Metadata

Metadata

Assignees

Labels

rustPull requests that update rust code

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions