Skip to content

Commit

Permalink
Use system xdg-open in Electron apps on Linux (#108)
Browse files Browse the repository at this point in the history
Fixes #107
  • Loading branch information
Rush authored and sindresorhus committed Mar 16, 2019
1 parent 56798ff commit 6d3f255
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -50,7 +50,8 @@ module.exports = (target, opts) => {
if (opts.app) {
cmd = opts.app;
} else {
cmd = process.platform === 'android' ? 'xdg-open' : path.join(__dirname, 'xdg-open');
const useSystemXdgOpen = process.versions.electron || process.platform === 'android';
cmd = useSystemXdgOpen ? 'xdg-open' : path.join(__dirname, 'xdg-open');
}

if (appArgs.length > 0) {
Expand Down

0 comments on commit 6d3f255

Please sign in to comment.