summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gui/packages/mobile/postinstall.js6
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);