@@ -86,13 +86,15 @@ Attempts to update packages, features, and system.
86
86
# Requires -Version 3
87
87
[Diagnostics.CodeAnalysis.SuppressMessageAttribute (' PSAvoidUsingWriteHost' , ' ' ,
88
88
Justification= ' This script is not intended for pipelining.' )]
89
+ [Diagnostics.CodeAnalysis.SuppressMessageAttribute (' PSUseSingularNouns' , ' ' ,
90
+ Justification= ' Some of these functions may deal with multiple updates.' )]
89
91
[CmdletBinding ()] Param (
90
92
# The sources of updates to install, in order.
91
93
[ValidateSet (' Chocolatey' , ' DellCommand' , ' Dotnet' , ' Essential' , ' GitHubCli' , ' Npm' , ' ScriptsData' ,
92
- ' PSHelp' , ' PSModule' , ' Scoop' , ' WindowsUpdate' , ' WindowsStore' , ' WinGet' )]
94
+ ' PSHelp' , ' PSModule' , ' Scoop' , ' VSCodeExtenions ' , ' WindowsUpdate' , ' WindowsStore' , ' WinGet' )]
93
95
[Parameter (Position = 0 , ValueFromRemainingArguments = $true )][string []] $Steps =
94
- @ (' Essential' , ' WindowsStore' , ' Scoop' , ' Chocolatey' , ' WinGet' , ' Npm' , ' Dotnet' ,
95
- ' GitHubCli ' , ' ScriptsData' , ' PSModule' , ' PSHelp' , ' DellCommand' , ' WindowsUpdate' )
96
+ @ (' Essential' , ' WindowsStore' , ' Scoop' , ' Chocolatey' , ' WinGet' , ' Npm' , ' Dotnet' , ' GitHubCli ' ,
97
+ ' VSCodeExtensions ' , ' ScriptsData' , ' PSModule' , ' PSHelp' , ' DellCommand' , ' WindowsUpdate' )
96
98
)
97
99
Begin
98
100
{
@@ -220,6 +222,14 @@ Begin
220
222
gh extension upgrade -- all
221
223
}
222
224
225
+ function Update-VSCodeExtenions
226
+ {
227
+ if (! (Get-Command code - ErrorAction Ignore))
228
+ {Write-Verbose ' VSCode not found, skipping.' ; return }
229
+ Write-Step " $UP Updating VSCode extensions"
230
+ code -- update-extensions
231
+ }
232
+
223
233
function Update-PSModule
224
234
{
225
235
Write-Step " $UP Updating PowerShell modules"
0 commit comments