Skip to content

Commit 5494ed6

Browse files
scrungrthgustavopch
authored andcommitted
fix: args not being properly forwarded to tsc
1 parent d84052b commit 5494ed6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ if (files.length === 0) {
1414
process.exit(0)
1515
}
1616

17-
const remainingArgsToForward = args
18-
.slice()
19-
.splice(argsProjectIndex, 2)
20-
.filter(arg => !files.includes(arg))
17+
const remainingArgsToForward = args.slice().filter(arg => !files.includes(arg))
18+
19+
if (argsProjectIndex !== -1) {
20+
remainingArgsToForward.splice(argsProjectIndex, 2)
21+
}
2122

2223
// Load existing config
2324
const tsconfigPath = argsProjectValue || resolveFromRoot('tsconfig.json')

0 commit comments

Comments
 (0)