Skip to content

Commit

Permalink
chore(script): fix promise task
Browse files Browse the repository at this point in the history
  • Loading branch information
keiko233 committed May 24, 2024
1 parent 50cc05e commit ef6fbe5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts/telegram-notify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { downloadFile } from "./utils/download";
import path from "path";
import { TEMP_DIR } from "./utils/env";
import { GIT_SHORT_HASH } from "./utils/shell";
import { existsSync } from "fs";

const nightlyBuild = process.argv.includes("--nightly");

Expand Down Expand Up @@ -76,7 +77,18 @@ const isValidFormat = (fileName: string): boolean => {
}
});

await Promise.all(downloadTasks);
consola.log(downloadTasks);

try {
await Promise.all(downloadTasks);
} catch (error) {
consola.error(error);
throw new Error("Error during download or upload tasks");
}

reourceMappping.forEach((item) => {
consola.log(`exited ${item}:`, existsSync(item));
});

consola.start("Staring upload tasks (nightly)");

Expand Down

0 comments on commit ef6fbe5

Please sign in to comment.