Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

fix: force exit after psql closes #207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix: force exit after psql closes #207

wants to merge 1 commit into from

Conversation

jdx
Copy link
Contributor

@jdx jdx commented May 18, 2018

No description provided.

@codecov-io
Copy link

codecov-io commented May 18, 2018

Codecov Report

Merging #207 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #207      +/-   ##
==========================================
- Coverage   95.23%   95.16%   -0.07%     
==========================================
  Files          55       55              
  Lines        1365     1366       +1     
==========================================
  Hits         1300     1300              
- Misses         65       66       +1
Impacted Files Coverage Δ
commands/psql.js 85.71% <0%> (-6.6%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0fc9a9...4185a84. Read the comment docs.

@@ -17,6 +17,9 @@ function * run (context, heroku) {
process.stdout.write(yield psql.exec(db, flags.command))
} else {
yield psql.interactive(db)
// sometimes psql hangs and causes the stdout "drain" event not to be fired in cli-ux
// so we force an exit here
cli.exit(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the issue is that the CLI is waiting for a stdout event that is not coming? That is, we want to ensure that once psql exits, the command is done and any pending background processing is moot?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah exactly. It's strange that this doesn't have anything to do with stdout really, the issue is that somewhere in the code path some node task is starting and not quitting

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants