Skip to content

Commit

Permalink
fix(tsbb): Fix fileNames exists error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 8, 2021
1 parent 98432e1 commit 23351f4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/tsbb/src/cli.ts
Expand Up @@ -50,11 +50,13 @@ const argv: ArgvArguments = parser(process.argv.slice(2), {

if (argv.fileNames && Array.isArray(argv.fileNames)) {
argv.fileNames = argv.fileNames.map((filename: string) => path.resolve(process.cwd(), filename));
argv.fileNames = [argv.entry, ...argv.fileNames];
if (ts.sys.fileExists(argv.entry)) {
argv.fileNames = [argv.entry, ...argv.fileNames];
}
argv.fileNames = Array.from(new Set(argv.fileNames));
}

if (!argv.fileNames) {
if (!argv.fileNames && ts.sys.fileExists(argv.entry)) {
argv.fileNames = [argv.entry];
}

Expand Down

0 comments on commit 23351f4

Please sign in to comment.