-
-
Notifications
You must be signed in to change notification settings - Fork 194
.catch doesn't trigger for .remote #215
Comments
@mrkrstphr As per child_process docs, the promise would be only rejected if there was some problem in the "child_process" module in not being able to start the command. If there is something wrong with the child process (in your case
|
Same issue here. |
Node child process is an event emitter, https://nodejs.org/docs/latest/api/child_process.html#child_process_event_exit |
Any progress on this? |
I found the problem. If you use cwd option, command is chained like this https://github.com/shipitjs/shipit/blob/master/packages/ssh-pool/src/commands/ssh.js#L4 and exit code is from |
PR #265 |
This is still occurring for me on the latest version of shipit (which looks to include the #265 PR mentioned above). It looks like this line here:
is not exiting even if Changing it to just use
fixed it for me. Any specific reason it doesn't already work like that or should I open a PR for it? Or even more specifically, since the Note that for reference, the remote I'm running with is ubuntu which executes these commands via bash. |
I have an issue where I have a task to run database migrations via knex that is failing, but shipit just keeps running and never triggers the catch block.
If I console log inside
.then()
I see:Not only does it not trigger the catch, but it shows an exit code of 0, which I assume is the exit code of the ssh command, not the command on the remote server.
The command on the remote server returns an exit code of 1.
How can I get this to trigger the .catch block so I can exit when migrations fail?
The text was updated successfully, but these errors were encountered: