Skip to content

Commit

Permalink
Fixed issue with symlink already exists error on Android (#160)
Browse files Browse the repository at this point in the history
Instead of deleting and creating if the symlink exists, we now only creates it if the symlink does not exist.
  • Loading branch information
chrfalch authored Feb 1, 2022
1 parent f835461 commit dffc670
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions package/scripts/install-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ const createSymlink = (p) => {
const srcDir = path.resolve(`./cpp/${p}`);
const dstDir = path.resolve(`./android/cpp/${p}`);

if (fs.existsSync(dstDir)) {
fs.unlinkSync(dstDir);
if (!fs.existsSync(dstDir)) {
fs.symlinkSync(srcDir, dstDir, "dir");
}

fs.symlinkSync(srcDir, dstDir, "dir");
};

// Copy common cpp files from the package root to the android folder
Expand Down

0 comments on commit dffc670

Please sign in to comment.