File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -21,22 +21,18 @@ function Install-VSBuildTools2022 {
2121 [string ]$installationPath
2222 )
2323
24- $url = ' https://aka.ms/vs/17/release/vs_BuildTools.exe' ;
25-
26- $options = @ (
27- ' --quiet' ,
28- ' --norestart' ,
29- ' --nocache' ,
30- ' --wait'
31- );
24+ $packageParameters = @ ();
3225
3326 foreach ($workload in $workloads ) {
34- $options += @ (' --add' , $workload );
27+ $packageParameters += @ (' --add' , $workload );
3528 }
3629
3730 if ($installationPath ) {
38- $options += @ (' --installPath' , $installationPath );
31+ $packageParameters += @ (' --installPath' , $installationPath );
3932 }
4033
41- Install-FromExe - Name ' VSBuildTools2022' - url $url - Options $options - noVerify;
34+ Install-FromChoco `
35+ - Name visualstudio2022buildtools `
36+ - PackageParameters $packageParameters `
37+ - noVerify;
4238}
You can’t perform that action at this time.
0 commit comments