Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix the way arguments are passed to the runspace #2720

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

Marterich
Copy link
Contributor

Type of Change

  • Hotfix

Description

This is my take on fixing the Runspace problem where the arguments would be interpreted as a string instead of a list and couldn't be distinguished between the parameters of the function.
I added a new -ParameterList option to provide the parameter Name as well as the content and reverted the -ArgumentList to the old logic for backwards compatibility

Testing

I tested installs/uninstalls of programs and tweaks but not much else.

@Marterich Marterich mentioned this pull request Sep 11, 2024
12 tasks
Start-Process -FilePath "powershell" -ArgumentList "choco feature enable -n allowGlobalConfirmation" -Wait -NoNewWindow
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change the method of choco install?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other method seemed to be broken (see discord messages)

@ChrisTitusTech ChrisTitusTech merged commit 7fe0f9a into ChrisTitusTech:main Sep 12, 2024
1 check passed
@ChrisTitusTech ChrisTitusTech added the bug Something isn't working label Sep 15, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants