Skip to content

Commit

Permalink
feat(installer): add deb installer
Browse files Browse the repository at this point in the history
  • Loading branch information
malept authored and MarshallOfSound committed Dec 31, 2016
1 parent 1489e64 commit fb217c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/electron-forge-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import './util/terminate';

import darwinDMGInstaller from './installers/darwin/dmg';
import darwinZipInstaller from './installers/darwin/zip';
import linuxDebInstaller from './installers/linux/deb';

const d = debug('electron-forge:lint');

Expand Down Expand Up @@ -134,7 +135,7 @@ const main = async () => {
'.dmg': darwinDMGInstaller,
},
linux: {
'.deb': async () => {},
'.deb': linuxDebInstaller,
'.rpm': async () => {},
'.flatpak': async () => {},
},
Expand Down
8 changes: 8 additions & 0 deletions src/installers/linux/deb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pify from 'pify';
import sudo from 'sudo-prompt';

export default async (filePath) => {
await pify(sudo.exec)(`gdebi -n ${filePath}`, {
name: 'Electron Forge',
});
};

0 comments on commit fb217c7

Please sign in to comment.