Skip to content
Permalink
Browse files

refactor(installer): finish replacing sudo-prompt with electron-sudo

  • Loading branch information
malept authored and MarshallOfSound committed Dec 31, 2016
1 parent a0b5ac7 commit d858793014fd694e791a3c1eb972d311447992ed
Showing with 3 additions and 5 deletions.
  1. +0 −1 package.json
  2. +3 −4 src/installers/darwin/zip.js
@@ -82,7 +82,6 @@
"pify": "^2.3.0",
"resolve-package": "^1.0.1",
"semver": "^5.3.0",
"sudo-prompt": "^6.2.1",
"username": "^2.2.2",
"yarn-or-npm": "^2.0.2",
"zip-folder": "^1.0.0"
@@ -2,7 +2,7 @@ import fs from 'fs-promise';
import inquirer from 'inquirer';
import path from 'path';
import pify from 'pify';
import sudo from 'sudo-prompt';
import { default as Sudoer } from 'electron-sudo';
import { exec, spawn } from 'child_process';

export default async (filePath, installSpinner) => {
@@ -44,9 +44,8 @@ export default async (filePath, installSpinner) => {
if (writeAccess) {
await pify(exec)(moveCommand);
} else {
await pify(sudo.exec)(moveCommand, {
name: 'Electron Forge',
});
const sudoer = new Sudoer({ name: 'Electron Forge' });
await sudoer.exec(moveCommand);
}

spawn('open', ['-R', targetApplicationPath], { detached: true });

0 comments on commit d858793

Please sign in to comment.
You can’t perform that action at this time.