Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/command-exists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const commandExistsWindowsSync = function (
): boolean {
// Regex from Julio from: https://stackoverflow.com/questions/51494579/regex-windows-path-validator
if (
!/^(?!(?:.*\s|.*\.|\W+)$)(?:[A-Za-z]:)?(?:[^\n"*:<>?|]+(?:\/\/|\/|\\\\|\\)?)+$/m.test(
!/^(?!(?:.*\s|.*\.|\W+)$)(?:[A-Za-z]:)?(?:[^\\s"*:<>?|]+(?:\/\/|\/|\\\\|\\)?)+$/m.test(

Check failure

Code scanning / CodeQL

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '!'.
commandName
)
) {
Expand Down