From 0b90e21f641439a715f132959c517caf5ab9d485 Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Mon, 7 Dec 2020 13:39:37 +0100 Subject: [PATCH] fix: doctor command prints output twice It turns out that, by a mistake, `doctor` command is registered twice, both as project and detached command. It has been converted to `detached` few months ago. It could be hidden `commander` feature that when multiple functions are registered under the same name, they run in order. Attaching some screenshots for reference: Removing it from `projectCommands` fixes the problem. We will address similar issue https://github.com/react-native-community/cli/issues/1261 soon where detached commands (such as `doctor` included) can receive and take advantage of `config` when present in the project. --- packages/cli/src/commands/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index fc5b657fe..9255335de 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -24,7 +24,6 @@ export const projectCommands = [ upgrade, info, config, - doctor, profileHermes, ] as Command[];