Skip to content

Commit

Permalink
get: refactor symlink declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmanchhabra committed Dec 18, 2023
1 parent bd7558d commit ea198c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,14 @@ const getNodeHeaders = async (options) => {
}

const createSymlinks = async (options) => {
const frameworksPath = path.join(process.cwd(), options.cacheDir, `nwjs${options.flavor === "sdk" ? "-sdk" : ""}-v${options.version}-${options.platform}-${options.arch}`, "nwjs.app", "Contents", "Frameworks", "nwjs Framework.framework");
const symlinks = [
path.resolve(options.cacheDir, `nwjs${options.flavor === "sdk" ? "-sdk" : ""}-v${options.version}-${options.platform}-${options.arch}`, "nwjs.app", "Contents", "Frameworks", "nwjs Framework.framework", "Helpers"),
path.resolve(options.cacheDir, `nwjs${options.flavor === "sdk" ? "-sdk" : ""}-v${options.version}-${options.platform}-${options.arch}`, "nwjs.app", "Contents", "Frameworks", "nwjs Framework.framework", "Libraries"),
path.resolve(options.cacheDir, `nwjs${options.flavor === "sdk" ? "-sdk" : ""}-v${options.version}-${options.platform}-${options.arch}`, "nwjs.app", "Contents", "Frameworks", "nwjs Framework.framework", "nwjs Framework"),
path.resolve(options.cacheDir, `nwjs${options.flavor === "sdk" ? "-sdk" : ""}-v${options.version}-${options.platform}-${options.arch}`, "nwjs.app", "Contents", "Frameworks", "nwjs Framework.framework", "Resources"),
path.resolve(options.cacheDir, `nwjs${options.flavor === "sdk" ? "-sdk" : ""}-v${options.version}-${options.platform}-${options.arch}`, "nwjs.app", "Contents", "Frameworks", "nwjs Framework.framework", "Versions", "Current"),
path.join(frameworksPath, "Helpers"),
path.join(frameworksPath, "Libraries"),
path.join(frameworksPath, "nwjs Framework"),
path.join(frameworksPath, "Resources"),
path.join(frameworksPath, "Versions", "Current"),
];

for await (const symlink of symlinks) {
const link = String(await fsm.readFile(symlink));
await fsm.rm(symlink);
Expand Down
5 changes: 0 additions & 5 deletions t.js

This file was deleted.

0 comments on commit ea198c5

Please sign in to comment.