Skip to content

Commit

Permalink
Ensure data is flushed after downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh committed Apr 3, 2024
1 parent f1603ff commit 65ef138
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/driver/src/cli.mts
Expand Up @@ -88,9 +88,10 @@ async function downloadCliPackage() {
await downloadFile(downloadUrl, TEMPORARY_CLI_PATH);
debug("CLI package downloaded to:", TEMPORARY_CLI_PATH);

await fs.chmod(TEMPORARY_CLI_PATH, 0o755);
const stat = await fs.stat(TEMPORARY_CLI_PATH);
debug("CLI package stats:", stat);
const fd = await fs.open(TEMPORARY_CLI_PATH, "r+");
await fd.chmod(0o755);
await fd.datasync();
await fd.close();
}

async function getCliLocationFromCache(): Promise<string | null> {
Expand Down

0 comments on commit 65ef138

Please sign in to comment.