Skip to content

Commit

Permalink
fix(cli): don't print dev cmd banner when terminal doesn't support it
Browse files Browse the repository at this point in the history
This for example was an issue with the default macOS terminal, but
others like iTerm 2 on Mac is fine (and please use that btw!), as well
as the Windows terminal and most Linux ones by now.
  • Loading branch information
edvald committed Aug 11, 2021
1 parent d668622 commit 3a63725
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ export class DevCommand extends Command<DevCommandArgs, DevCommandOpts> {

async prepare({ log, footerLog }: PrepareParams<DevCommandArgs, DevCommandOpts>) {
// print ANSI banner image
const data = await readFile(ansiBannerPath)
log.info(data.toString())
if (chalk.supportsColor && chalk.supportsColor.level > 2) {
const data = await readFile(ansiBannerPath)
log.info(data.toString())
}

log.info(chalk.gray.italic(`Good ${getGreetingTime()}! Let's get your environment wired up...`))
log.info("")
Expand Down

0 comments on commit 3a63725

Please sign in to comment.