diff --git a/lib/shared/permissions.js b/lib/shared/permissions.js index 2e89084f..b051cc7f 100755 --- a/lib/shared/permissions.js +++ b/lib/shared/permissions.js @@ -179,6 +179,10 @@ const elevateScriptUnix = async (path, name) => { * }); */ exports.elevateCommand = async (command, options) => { + if (await exports.isElevated()) { + await childProcess.execFileAsync(command[0], command.slice(1), { env: options.environment }) + return { cancelled: false } + } const isWindows = os.platform() === 'win32' const launchScript = exports.createLaunchScript(command[0], command.slice(1), options.environment) return Bluebird.using(tmpFileDisposer({ postfix: '.cmd' }), async ({ path }) => {