Repository: cypress-io/cypress
File: cli/lib/cli.js (JavaScript)

Code before:

    program
    .command('open-ct')
    .usage('[options]')
    .description('Opens Cypress component testing interactive mode. Deprecated: use "open --ct"')
    .option('-b, --browser <browser-path>', text('browserOpenMode'))
    .option('-c, --config <config>', text('config'))
    .option('-C, --config-file <config-file>', text('configFile'))
    .option('-d, --detached [bool]', text('detached'), coerceFalse)
    .option('-e, --env <env>', text('env'))
    .option('--global', text('global'))
    .option('-p, --port <port>', text('port'))
    .option('-P, --project <project-path>', text('project'))
    .option('--dev', text('dev'), coerceFalse)
    .action((opts) => {
      debug('opening Cypress')

      let msg = `
      ${logSymbols.warning} Warning: open-ct is deprecated and will be removed in a future release.
      Use \`open --ct\` or \`open --component\` instead.
      `

      logger.log()
      logger.warn(stripIndent(msg))
      logger.log()

      require('./exec/open')
      .start({ ...util.parseOpts(opts), testingType: 'component' })
      .catch(util.logErrorExit1)
    })

    program
    .command('run-ct')
    .usage('[options]')
    .description('Runs all Cypress component testing suites. Deprecated: use "run --ct"')
    .option('-b, --browser <browser-name-or-path>', text('browserRunMode'))
    .option('--ci-build-id <id>', text('ciBuildId'))
    .option('-c, --config <config>', text('config'))
    .option('-C, --config-file <config-file>', text('configFile'))
    .option('-e, --env <env>', text('env'))
    .option('--group <name>', text('group'))
    .option('-k, --key <record-key>', text('key'))
    .option('--headed', text('headed'))
    .option('--headless', text('headless'))
    .option('--no-exit', text('exit'))
    .option('--parallel', text('parallel'))
    .option('-p, --port <port>', text('port'))
    .option('-P, --project <project-path>', text('project'))
    .option('-q, --quiet', text('quiet'))
    .option('--record [bool]', text('record'), coerceFalse)
    .option('-r, --reporter <reporter>', text('reporter'))

Review comment (bug):
```suggestion
      let msg = `
      ${logSymbols.warning} Warning: `cypress open-ct` is deprecated and will be removed in a future release.

      Use \`cypress open --ct\` or \`cypress open --component\` instead.
      `

      logger.warn()
      logger.warn(stripIndent(msg))
      logger.warn()
```

It was bugging me that the vertical spacing wasn't showing up, then I realized `logger.log()` won't log unless the log-level is increased beyond `warn`. I figure the formatting of the message shouldn't be reliant on the log-level.

Code after:

    program
    .command('open-ct')
    .usage('[options]')
    .description('Opens Cypress component testing interactive mode. Deprecated: use "open --component"')
    .option('-b, --browser <browser-path>', text('browserOpenMode'))
    .option('-c, --config <config>', text('config'))
    .option('-C, --config-file <config-file>', text('configFile'))
    .option('-d, --detached [bool]', text('detached'), coerceFalse)
    .option('-e, --env <env>', text('env'))
    .option('--global', text('global'))
    .option('-p, --port <port>', text('port'))
    .option('-P, --project <project-path>', text('project'))
    .option('--dev', text('dev'), coerceFalse)
    .action((opts) => {
      debug('opening Cypress')

      const msg = `
      ${logSymbols.warning} Warning: open-ct is deprecated and will be removed in a future release.

      Use \`cypress open --component\` instead.
      `

      logger.warn()
      logger.warn(stripIndent(msg))
      logger.warn()

      require('./exec/open')
      .start({ ...util.parseOpts(opts), testingType: 'component' })
      .catch(util.logErrorExit1)
    })

    program
    .command('run-ct')
    .usage('[options]')
    .description('Runs all Cypress component testing suites. Deprecated: use "run --component"')
    .option('-b, --browser <browser-name-or-path>', text('browserRunMode'))
    .option('--ci-build-id <id>', text('ciBuildId'))
    .option('-c, --config <config>', text('config'))
    .option('-C, --config-file <config-file>', text('configFile'))
    .option('-e, --env <env>', text('env'))
    .option('--group <name>', text('group'))
    .option('-k, --key <record-key>', text('key'))
    .option('--headed', text('headed'))
    .option('--headless', text('headless'))
    .option('--no-exit', text('exit'))
    .option('--parallel', text('parallel'))
    .option('-p, --port <port>', text('port'))
    .option('-P, --project <project-path>', text('project'))
    .option('-q, --quiet', text('quiet'))
    .option('--record [bool]', text('record'), coerceFalse)