diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2021-12-31 20:17:17 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2021-12-31 20:17:17 -0400 |
commit | 7710fc578ec94bb9edca551e7d38ab30d8560ecf (patch) | |
tree | 8a757b58895001d49f1d8f65c334a87646e5e9b9 /src | |
parent | 61ebd2b91809d372253c1005552a9012c519b361 (diff) |
create junction symlinks on windows
Diffstat (limited to 'src')
-rwxr-xr-x | src/upd8.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/upd8.js b/src/upd8.js index 6a0ff088..91cc66df 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -2052,7 +2052,13 @@ function writeSymlinks() { throw error; } } - await symlink(path.resolve(directory), file); + try { + await symlink(path.resolve(directory), file); + } catch (error) { + if (error.code === 'EPERM') { + await symlink(path.resolve(directory), file, 'junction'); + } + } } } |