Skip to content

Commit

Permalink
fix: More robust logic to determine latest available Chrome version
Browse files Browse the repository at this point in the history
Fixes #517
  • Loading branch information
Göran Sander committed Mar 6, 2024
1 parent b2310e6 commit 182c1fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/butler-sheet-icons.js
Expand Up @@ -43,7 +43,7 @@ const program = new Command();
if (!options.browserVersion || options.browserVersion === '') {
if (options.browser === 'chrome') {
// eslint-disable-next-line no-param-reassign
options.browserVersion = 'stable';
options.browserVersion = 'latest';
} else if (options.browser === 'firefox') {
// eslint-disable-next-line no-param-reassign
options.browserVersion = 'latest';
Expand Down Expand Up @@ -279,7 +279,7 @@ const program = new Command();
if (!options.browserVersion || options.browserVersion === '') {
if (options.browser === 'chrome') {
// eslint-disable-next-line no-param-reassign
options.browserVersion = 'stable';
options.browserVersion = 'latest';
} else if (options.browser === 'firefox') {
// eslint-disable-next-line no-param-reassign
options.browserVersion = 'latest';
Expand Down Expand Up @@ -362,7 +362,7 @@ const program = new Command();
)
.option(
'--browser-version <version>',
'Version (=build id) of the browser to install. Use "butler-sheet-icons browser list-installed" to see which browsers are currently installed.'
'Version (=build id) of the browser to install. Use "butler-sheet-icons browser list-installed" to see which browsers are currently installed. Leave empty or set to "latest" to get latest available version.'
);

// ---------
Expand Down
2 changes: 1 addition & 1 deletion src/lib/browser/browser-install.js
Expand Up @@ -65,7 +65,7 @@ const browserInstall = async (options, _command) => {
}

logger.info(
`Resolved browser build id: "${buildId}" for browser "${options.browser}" version "${options.browserVersion}"`
`Resolved browser build id: "${buildId}" for browser "${options.browser}" version "${options.browserVersion}" on platform "${platform}"`
);

// Ensure browser can be downloaded
Expand Down

0 comments on commit 182c1fc

Please sign in to comment.