Skip to content

Commit d3d5e2c

Browse files
author
Vladimir Belov
committed
Fixed #56 (В Windows 11 build вызывает RangeError: Maximum call stack size exceeded)
1 parent 5c04a6e commit d3d5e2c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/utils/get-targets.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const allowedConfigs = [
1010
];
1111

1212
export function getTargets(context: string): Array<string> {
13-
if (typeof context === 'string')
13+
if (typeof context === 'string' && context !== '')
1414
{
1515
const rcFilePath = path.resolve(context, rcFileName);
1616
if (fs.existsSync(rcFilePath))
@@ -25,7 +25,10 @@ export function getTargets(context: string): Array<string> {
2525
}
2626
else
2727
{
28-
if (context !== path.sep)
28+
if (
29+
context !== path.sep
30+
&& !/^[A-Z]:\\$/.test(context)
31+
)
2932
{
3033
return getTargets(path.dirname(context));
3134
}

0 commit comments

Comments
 (0)