From 09b26c5abf50921a93e7e816ed5a77247287755d Mon Sep 17 00:00:00 2001 From: Nathan Thompson <5140837+legitosaurus@users.noreply.github.com> Date: Fri, 30 Oct 2020 13:41:31 -0500 Subject: [PATCH 1/2] Change dependency to fs-extra Change fs util library from fs.extra to fs-extra. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a4a705b..3d93499 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "author": "Lazamar @ FourLabs", "license": "ISC", "dependencies": { - "fs.extra": "^1.3.2" + "fs-extra": "^9.0.0", }, "devDependencies": {}, "repository": { From 7e983398a593263419d38dce21f502cd497d7a2f Mon Sep 17 00:00:00 2001 From: Nathan Thompson <5140837+legitosaurus@users.noreply.github.com> Date: Fri, 30 Oct 2020 13:53:46 -0500 Subject: [PATCH 2/2] use ensureSymlink instead Use ensureSymlink instead of symlink to allow linking of scoped npm packages. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a99243f..9bf25a8 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ 'use strict'; const path = require('path'); -const fs = require('fs.extra'); +const fs = require('fs-extra'); const isWin = process.platform === 'win32'; class DepLinker { @@ -99,7 +99,7 @@ class DepLinker { // In the future it is possible to utilize the 'runas' module // to ShellExec this command with the Verb: RunAs under Windows. The // ideal scenario would be for the task to prompt the user for credentials. - fs.symlink(linkSource, linkDestiny, linkType, resolve); + fs.ensureSymlink(linkSource, linkDestiny, linkType, resolve); })) .then((err) => { // Report on errors if (err) { console.log(err); }