Skip to content

Commit e13e94b

Browse files
MaStr11gluons
andauthored
commandAst may not be a string
Co-Authored-By: Saran Tanpituckpong ✅ <[email protected]>
1 parent e1d5348 commit e13e94b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/completions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
return @();
3838
}
3939

40-
if ($commandAst -match "npm(.cmd)?\s+run(-script)?\s") {
40+
if ($commandAst.ToString() -match "npm(.cmd)?\s+run(-script)?\s*") {
4141
$allScripts = Get-PackageJsonPath | Get-PackageJsonScripts -scriptFilter "$wordToComplete*"
4242
$result=$allScripts | ForEach-Object {
4343
# item1 is the script name, item2 is the script text (passed as tooltip)

0 commit comments

Comments
 (0)