graphile/migrate

Show stderr/stdout instead of stacktrace in `watch` (and `commit`?)

tsnobip opened this issue · 3 comments

Feature description

graphile-migrate watch allows to run commands after running current migration, but when this command exits with a non-0 code, it just shows the stacktrace instead of stdout/stderr you're usually interested in.

Desired behavior:
Capture d’écran 2022-10-20 à 12 04 03

Current behavior:
Capture d’écran 2022-10-20 à 11 21 47

Same thing can somehow be said for graphile-migrate commit, right now it first shows the stacktrace before showing details, including stdout as an escaped string. it would likely be more readable to show stdout/stderr without processing.
Capture d’écran 2022-10-20 à 12 05 17

Motivating example

The most obvious example is when you want to run tests after current / migrations, you want the exit code to be taken in consideration for CI for example, but at the same time you want a readable output to understand which test failed.

The escape hatch I use for now is to ignore exit code when using watch but not in commit.

Supporting development

I [tick all that apply]:

  • [] am interested in building this feature myself
  • am interested in collaborating on building this feature
  • am willing to help testing this feature before it's released
  • am willing to write a test-driven test suite for this feature (before it exists)
  • am a Graphile sponsor ❤️
  • have an active support or consultancy contract with Graphile
zimme commented

Probably related to #152.

Fix is out in 1.4.1

zimme commented

1.4.1 works for me 👍