Skip to content

Commit

Permalink
fix: create cache dir before downloading version manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayushman Chhabra committed Jul 25, 2023
1 parent d24d697 commit 6cfeef3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ const nwbuild = async (options) => {

options = await parse(options, manifest);

built = await isCached(options.cacheDir);
if (built === false) {
await mkdir(options.cacheDir, { recursive: true });
}

if (options.mode !== "get" && options.mode !== "run") {
// Create outDir if it does not exist
built = await isCached(options.outDir);
Expand Down Expand Up @@ -95,8 +100,7 @@ const nwbuild = async (options) => {

nwDir = resolve(
options.cacheDir,
`nwjs${options.flavor === "sdk" ? "-sdk" : ""}-v${options.version}-${
options.platform
`nwjs${options.flavor === "sdk" ? "-sdk" : ""}-v${options.version}-${options.platform
}-${options.arch}`
);

Expand Down

0 comments on commit 6cfeef3

Please sign in to comment.