Skip to content

Commit e872add

Browse files
author
Alexis Pierru
committed
Add extra check for missing sourcemap files
1 parent 0b0e1da commit e872add

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ async function run() {
7575
form.append("file", fs.createReadStream(file_path));
7676

7777
if (sourcemap_file_path) {
78+
if (!fs.existsSync(sourcemap_file_path)) {
79+
throw new Error("Could not access file:" + sourcemap_file_path);
80+
}
81+
7882
try {
7983
form.append("sourcemap", fs.createReadStream(sourcemap_file_path));
8084
} catch (err) {

0 commit comments

Comments
 (0)