You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug @pgtyped/cli does not respect the failOnError flag during generation.
Expected behavior
The workers should stop, and the process should exit with code 1.
Test case
In packages/example, add "failOnError": true to config.json
In any of the *.sql files, modify a statement to be incorrect.
Execute npm run typegen
The error will appear in the log, but execution does not stop, and echo $? returns 0
From my novice eye, it seems that this regression stems from e5f920e (as cdfadfb, the previous commit, is working as expected), specifically the changes in packages/cli/src/index.ts#L40.
I made a quick local test, replacing this.pool.run(opts, { name: functionName }); with
Describe the bug
@pgtyped/cli
does not respect thefailOnError
flag during generation.Expected behavior
The workers should stop, and the process should exit with code
1
.Test case
packages/example
, add"failOnError": true
toconfig.json
*.sql
files, modify a statement to be incorrect.npm run typegen
echo $?
returns0
From my novice eye, it seems that this regression stems from e5f920e (as cdfadfb, the previous commit, is working as expected), specifically the changes in
packages/cli/src/index.ts#L40
.I made a quick local test, replacing
this.pool.run(opts, { name: functionName });
withRerunning
npm run typegen
now behaves as expected, immediately stopping all workers as it encounters the erroneous file, and exiting with code1
.The text was updated successfully, but these errors were encountered: