diff --git a/src/cli/cli.ts b/src/cli/cli.ts index d600a9269a..cf8cc65758 100755 --- a/src/cli/cli.ts +++ b/src/cli/cli.ts @@ -39,6 +39,7 @@ const SCRIPTS_DIRECTORY = path.join(__dirname, '..', '..', 'bin'); type BrowserChannel = 'chrome-beta'|'chrome'|'msedge'; const allBrowserChannels: Set = new Set(['chrome-beta', 'chrome', 'msedge']); +const suggestedBrowsersToInstall = ['chromium', 'webkit', 'firefox', ...allBrowserChannels].map(name => `'${name}'`).join(', '); const packageJSON = require('../../package.json'); const ChannelName = { @@ -125,7 +126,7 @@ program const browserChannels: Set = new Set(args.filter((browser: any) => allBrowserChannels.has(browser))); const faultyArguments: string[] = args.filter((browser: any) => !browserNames.has(browser) && !browserChannels.has(browser)); if (faultyArguments.length) { - console.log(`Invalid installation targets: ${faultyArguments.map(name => `'${name}'`).join(', ')}. Expecting one of: ${[...allBrowserNames, ...allBrowserChannels].map(name => `'${name}'`).join(', ')}`); + console.log(`Invalid installation targets: ${faultyArguments.map(name => `'${name}'`).join(', ')}. Expecting one of: ${suggestedBrowsersToInstall}`); process.exit(1); } if (browserNames.has('chromium') || browserChannels.has('chrome-beta') || browserChannels.has('chrome') || browserChannels.has('msedge')) @@ -145,7 +146,7 @@ program console.log(` Install default browsers.`); console.log(``); console.log(` - $ install chrome firefox`); - console.log(` Install custom browsers, supports ${[...allBrowserNames, ...allBrowserChannels].map(name => `'${name}'`).join(', ')}.`); + console.log(` Install custom browsers, supports ${suggestedBrowsersToInstall}.`); }); async function installBrowserChannel(channel: BrowserChannel) {