Skip to content

Commit

Permalink
fix(cli): properly print error that occurred during hook execution (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
charlypoly committed Sep 26, 2022
1 parent 45b25ba commit 9d3eeda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-sloths-sparkle.md
@@ -0,0 +1,5 @@
---
'@graphql-codegen/cli': patch
---

CLI: properly print error that occurred during hook execution
2 changes: 2 additions & 0 deletions packages/graphql-codegen-cli/src/hooks.ts
Expand Up @@ -58,6 +58,8 @@ function execShellCommand(cmd: string): Promise<string> {
(error, stdout, stderr) => {
if (error) {
reject(error);
// eslint-disable-next-line no-console
console.error(error);
} else {
debugLog(stdout || stderr);
resolve(stdout || stderr);
Expand Down

0 comments on commit 9d3eeda

Please sign in to comment.