From e2cfc5c360d09a4ba98d8855769b8711c96f13b2 Mon Sep 17 00:00:00 2001 From: Charly POLY <1252066+charlypoly@users.noreply.github.com> Date: Wed, 20 Jul 2022 16:29:05 +0200 Subject: [PATCH] fix(cli): prevent duplicated error messages on fail (without watcher) (#8120) * fix(cli): prevent duplicated error messages on fail (without watcher) Related to #7546 * Create smooth-beans-fetch.md --- .changeset/smooth-beans-fetch.md | 5 +++++ packages/graphql-codegen-cli/src/cli.ts | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changeset/smooth-beans-fetch.md diff --git a/.changeset/smooth-beans-fetch.md b/.changeset/smooth-beans-fetch.md new file mode 100644 index 00000000000..84fbaeafaef --- /dev/null +++ b/.changeset/smooth-beans-fetch.md @@ -0,0 +1,5 @@ +--- +"@graphql-codegen/cli": patch +--- + +fix(cli): prevent duplicated error messages on fail (without watcher) diff --git a/packages/graphql-codegen-cli/src/cli.ts b/packages/graphql-codegen-cli/src/cli.ts index 6ca23ddeb03..7daf92d835b 100644 --- a/packages/graphql-codegen-cli/src/cli.ts +++ b/packages/graphql-codegen-cli/src/cli.ts @@ -16,7 +16,6 @@ export async function runCli(cmd: string): Promise { return await generate(context); } catch (error) { await lifecycleHooks(context.getConfig().hooks).onError(error.toString()); - throw error; } }