diff --git a/eng/common/pipelines/templates/steps/check-spelling.yml b/eng/common/pipelines/templates/steps/check-spelling.yml index 77c68e1d8..a25fd9444 100644 --- a/eng/common/pipelines/templates/steps/check-spelling.yml +++ b/eng/common/pipelines/templates/steps/check-spelling.yml @@ -18,8 +18,8 @@ steps: - task: NodeTool@0 condition: and(succeededOrFailed(), ne(variables['Skip.SpellCheck'],'true')) inputs: - versionSpec: 16.x - displayName: Use Node.js 16.x + versionSpec: 18.x + displayName: Use Node.js 18.x - task: PowerShell@2 displayName: Check spelling (cspell) diff --git a/eng/common/spelling/Invoke-Cspell.ps1 b/eng/common/spelling/Invoke-Cspell.ps1 index 3275e52fa..79205ed90 100644 --- a/eng/common/spelling/Invoke-Cspell.ps1 +++ b/eng/common/spelling/Invoke-Cspell.ps1 @@ -167,10 +167,12 @@ $originalLocation = Get-Location try { Set-Location $PackageInstallCache + npm install npx | Out-Null + npm install cspell | Out-Null npm install | Out-Null # Use the mutated configuration file when calling cspell - $command = "npx --no-install cspell $JobType --config $CSpellConfigPath --no-must-find-files --root $SpellCheckRoot --relative" + $command = "npx cspell $JobType --config $CSpellConfigPath --no-must-find-files --root $SpellCheckRoot --relative" Write-Host $command $cspellOutput = npx ` --no-install `