diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-08-21 15:25:19 +0300 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-08-22 12:24:27 +0300 |
| commit | ace973688e5c9ae6e4cd8b2e184b257a8c6738ae (patch) | |
| tree | 21a7ed4877a4d3a6d450676027c195c128a11595 /gui | |
| parent | a9bcd4b36bf4b2deeac8b06ac8e473b3678c645e (diff) | |
| download | mullvadvpn-ace973688e5c9ae6e4cd8b2e184b257a8c6738ae.tar.xz mullvadvpn-ace973688e5c9ae6e4cd8b2e184b257a8c6738ae.zip | |
Fix EPERM on Windows by creating a junction instead of symbolic link
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/packages/mobile/postinstall.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/packages/mobile/postinstall.js b/gui/packages/mobile/postinstall.js index 50234eae67..6b5c80664b 100644 --- a/gui/packages/mobile/postinstall.js +++ b/gui/packages/mobile/postinstall.js @@ -22,7 +22,11 @@ try { try { console.log('Adding a symlink to react-native'); - fs.symlinkSync(sourcePath, symlinkPath); + + // Symlinks require elevated permissions on Windows. Use junction instead. + const type = process.platform === 'win32' ? 'junction' : undefined; + + fs.symlinkSync(sourcePath, symlinkPath, type); console.log('Done'); } catch (error) { console.error('Cannot symlink react-native: ' + error.message); |
