Skip to content

Commit

Permalink
fix: make updateHashFromFiles() create directory
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Sep 26, 2023
1 parent 76221d0 commit f98c12a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/shared-lib-node/src/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export async function updateHashFromFiles(hashFilePath: string, ...paths: string
const newHash = await calculateHashFromFiles(...paths);
if (oldHash === newHash) return false;

await fs.promises.mkdir(path.dirname(hashFilePath), { recursive: true });
await fs.promises.writeFile(hashFilePath, newHash, 'utf8');
return true;
}
Expand Down

0 comments on commit f98c12a

Please sign in to comment.