From 13100c5985670210137773668b5627d8f5ff1d20 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 2 Nov 2022 18:03:12 -0400 Subject: [PATCH] cspell issues in cpp branch , needs updated node, and cspell and npx need to be installed for cspell to run (#4086) Co-authored-by: George Arama <50641385+gearama@users.noreply.github.com> --- eng/common/pipelines/templates/steps/check-spelling.yml | 4 ++-- eng/common/spelling/Invoke-Cspell.ps1 | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) 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 `