Skip to content

Commit

Permalink
feat(installer): add rpm 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 1c2bfd8 commit f8f9baa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/electron-forge-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import './util/terminate';
import darwinDMGInstaller from './installers/darwin/dmg';
import darwinZipInstaller from './installers/darwin/zip';
import linuxDebInstaller from './installers/linux/deb';
import linuxRPMInstaller from './installers/linux/rpm';

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

Expand Down Expand Up @@ -136,8 +137,10 @@ const main = async () => {
},
linux: {
'.deb': linuxDebInstaller,
'.rpm': async () => {},
'.flatpak': async () => {},
'.rpm': linuxRPMInstaller,
'.flatpak': async () => {
console.error('Not yet supported');
},
},
};

Expand Down
10 changes: 10 additions & 0 deletions src/installers/linux/rpm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pify from 'pify';
import sudo from 'sudo-prompt';

import linuxInstaller from '../../util/linux-installer';

export default async (filePath) => {
linuxInstaller('RPM', 'dnf', pify(sudo.exec)(`dnf --assumeyes --nogpgcheck install ${filePath}`, {
name: 'Electron Forge',
}));
};

0 comments on commit f8f9baa

Please sign in to comment.