Skip to content

Commit 2dcf3c2

Browse files
Accept list of files to check from stdin (#10272)
Invoke-Cspell.ps1 works fine when piping a list of file names to it from within PowerShell, but not another shell like bash. This is the fix. Co-authored-by: Heath Stewart <heaths@microsoft.com>
1 parent 1fc4018 commit 2dcf3c2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

eng/common/spelling/Invoke-Cspell.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ param(
3939
[Parameter()]
4040
[string] $JobType = 'lint',
4141

42+
# Defaulting to $input accepts a list of files on stdin from both PowerShell and external shells e.g., bash.
4243
[Parameter(ValueFromPipeline)]
43-
[array]$FileList,
44+
[array]$FileList = $input,
4445

4546
[Parameter()]
4647
[string] $CSpellConfigPath = (Resolve-Path "$PSScriptRoot/../../../.vscode/cspell.json"),

0 commit comments

Comments
 (0)