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; } }