Skip to content

Commit 0ccc0e9

Browse files
committed
JBDS-4272 Create symlinks in /usr/local/bin running script with admin rights
1 parent ad09a27 commit 0ccc0e9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

browser/services/platform.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,12 @@ class Platform {
243243
let name = path.parse(executable).name;
244244
commands.push(`rm -f /usr/local/bin/${name}; ln -s ${executable} /usr/local/bin/${name};`);
245245
});
246-
return pify(child_process.exec)(commands.join(' '));
246+
let osaScript = [
247+
'osascript',
248+
'-e',
249+
`"do shell script \\"${commands.join(' ')}\\" with administrator privileges"`
250+
];
251+
return pify(child_process.exec)(osaScript.join(' '));
247252
}
248253
}
249254

0 commit comments

Comments
 (0)