Skip to content

typeorm-ts-node-esm does not transfer exitCode of child process #10029

@pahuta

Description

@pahuta

Issue description

If process of creating, generating, running migration runs by typeorm-ts-node-esm and fails, the main process exit code will be 0.

Expected Behavior

If child process fails (cli.js), parent process exit code will not be 0.

Actual Behavior

If child process fails (cli.js), parent process exit code the same as in child process (not 0).

Steps to reproduce

Clone https://github.com/pahuta/typeorm-cli-bug-sandbox repo and follow instructions in readme.

My Environment

Dependency Version
Operating System MacOS 13.3.1
Node.js version 16.19.1
Typescript version 5.0.4
TypeORM version 0.3.15

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, and I know how to start.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions