Skip to content

Commit

Permalink
feat: update brave command line and add chromium (#191)
Browse files Browse the repository at this point in the history
Co-authored-by: Bruno Bonnin <[email protected]>
  • Loading branch information
bbonnin and brunobonnin authored Mar 17, 2021
1 parent a8ae59c commit 1dd1c15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/helpers/browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ module.exports = {
utils.log('trace', 'getBraveBrowser');
let braveVersion;
if (utils.isLinux) {
braveVersion = utils.run('brave --version').then(v => v.replace(/^.* ([^ ]*)/g, '$1'));
braveVersion = utils
.run('brave --version || brave-browser --version')
.then(v => v.replace(/^.* ([^ ]*)/g, '$1'));
} else if (utils.isMacOS) {
braveVersion = utils
.getDarwinApplicationVersion(utils.browserBundleIdentifiers['Brave Browser'])
Expand Down Expand Up @@ -56,6 +58,17 @@ module.exports = {
return chromeCanaryVersion.then(v => utils.determineFound('Chrome Canary', v, 'N/A'));
},

getChromiumInfo: () => {
utils.log('trace', 'getChromiumInfo');
let chromiumVersion;
if (utils.isLinux) {
chromiumVersion = utils.run('chromium --version').then(utils.findVersion);
} else {
chromiumVersion = Promise.resolve('N/A');
}
return chromiumVersion.then(v => utils.determineFound('Chromium', v, 'N/A'));
},

getEdgeInfo: () => {
utils.log('trace', 'getEdgeInfo');
let edgeVersion;
Expand Down
1 change: 1 addition & 0 deletions src/presets.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ module.exports = {
'Brave Browser',
'Chrome',
'Chrome Canary',
'Chromium',
'Edge',
'Firefox',
'Firefox Developer Edition',
Expand Down

0 comments on commit 1dd1c15

Please sign in to comment.