-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Update dev-environment-setup.ps1 #16278
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
base: trunk
Are you sure you want to change the base?
Conversation
This PR fixes the parameters passed to the `choco` command. Because of the way powershell sends parameters to a command when it is external (MicrosoftDocs/PowerShell-Docs#2361), the `params` parameters passed where not being correctly interpreted by `choco` and would therefore not being taken into account. Now, we use `Start-Process` with `-ArgumentList` which correctly parses and sends the parameters to `choco.exe` which allow us a couple of things: 1. `msys2` will be installed to the `InstallDir´ (it just so happens that we use the default folder for installation) 2. We can not add workloads to the VS 2022 Community installation, which has a couple of benefits: 2.1. We can add `Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended` and `Microsoft.VisualStudio.Workload.ManagedDesktop` which are necessary for compiling Selenium in Visual Studio 2.2. Now the installation of VS is completely automatic and does not need feedback from the user
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
💥 What does this PR do?
This PR fixes the parameters passed to the
choco
command. Because of the way powershell sends parameters to a command when it is external (MicrosoftDocs/PowerShell-Docs#2361), theparams
parameters passed where not being correctly interpreted bychoco
and would therefore not be taken into account. Now we useStart-Process
with-ArgumentList
which correctly parses and sends the parameters tochoco.exe
which allow us a couple of things:msys2
will be installed to theInstallDir
(it just so happens that we use the default folder for installation)Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended
andMicrosoft.VisualStudio.Workload.ManagedDesktop
which are necessary for compiling Selenium in Visual Studio🔄 Types of changes
PR Type
Bug fix, Enhancement
Description
Fix PowerShell parameter passing to
choco
command usingStart-Process
Automate Visual Studio 2022 workload installation without user interaction
Improve parameter handling with proper null checks and array construction
Remove manual Visual Studio setup prompts for fully automated installation
Diagram Walkthrough
File Walkthrough
dev-environment-setup.ps1
Fix choco parameter passing and automate VS installation
scripts/dev-environment-setup.ps1
choco
calls withStart-Process
and-ArgumentList
components