Skip to content

Commit 142e9ec

Browse files
committed
Merge pull request mgechev#728 from gkalpak/patch-5
fix(tasks_tools): ensure RegExp only matches the file extension
2 parents 15173f1 + 34cd091 commit 142e9ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/utils/seed/tasks_tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function readDir(root: string, cb: (taskname: string) => void) {
4343
let file = files[i];
4444
let curPath = join(path, file);
4545
if (lstatSync(curPath).isFile() && /\.ts$/.test(file)) {
46-
let taskname = file.replace(/(\.ts)/, '');
46+
let taskname = file.replace(/\.ts$/, '');
4747
cb(taskname);
4848
}
4949
}

0 commit comments

Comments
 (0)