Skip to content

Commit 3434b1b

Browse files
LiaoPengdcodeIO
authored andcommitted
Handle absolute paths to entry files in asc (#713)
1 parent 72d0fe6 commit 3434b1b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cli/asc.js

+2
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@ exports.main = function main(argv, options, callback) {
477477
const filename = argv[i];
478478

479479
let sourcePath = String(filename).replace(/\\/g, "/").replace(/(\.ts|\/)$/, "");
480+
// Setting the path to relative path
481+
sourcePath = path.isAbsolute(sourcePath) ? path.relative(baseDir, sourcePath) : sourcePath;
480482

481483
// Try entryPath.ts, then entryPath/index.ts
482484
let sourceText = readFile(sourcePath + ".ts", baseDir);

0 commit comments

Comments
 (0)