diff --git a/.changeset/curly-clocks-warn.md b/.changeset/curly-clocks-warn.md new file mode 100644 index 00000000000..42316cc7e93 --- /dev/null +++ b/.changeset/curly-clocks-warn.md @@ -0,0 +1,5 @@ +--- +'@graphql-codegen/cli': patch +--- + +Prevent cli from early returning when run init command. diff --git a/packages/graphql-codegen-cli/src/cli.ts b/packages/graphql-codegen-cli/src/cli.ts index 8dd67671367..5a8374ba0cb 100644 --- a/packages/graphql-codegen-cli/src/cli.ts +++ b/packages/graphql-codegen-cli/src/cli.ts @@ -8,7 +8,7 @@ export async function runCli(cmd: string): Promise { await ensureGraphQlPackage(); if (cmd === 'init') { - init(); + await init(); return 0; }