New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deploy:check failing does not trigger deploy:failed or deploy:finished #1993
Comments
Is it intentional that the You can also run capistrano with |
No, "rending_hook" was bad copy and paste. I changed the original hook names for confidentially and the original name started with an "r" The failure hook was working when the deploy failed because of an interrupt, like ctrl+C, but not if I let it get to where it would fail via deploy:check |
Interesting! Looking at the code, that is indeed the behavior. That is, when a deploy fails due to a linked file not existing, the The capistrano/lib/capistrano/tasks/deploy.rake Lines 90 to 93 in 220db8f
This behavior has been in place ever since Capistrano 3.0 was released. I don't know if this behavior was intentional when it was written 5 years ago, or if this is a bug. Even if it is a bug (and I am inclined to agree it is) I am hesitant to change this behavior since it has been this way for 5 years and this is the first time the problem has ever been reported, to my knowledge. The workaround would be for you to redefine the @will-in-wi and @leehambley is this something we should fix? I guess the risk is that there users are relying on the current behavior, because it would be a breaking change for them. |
I'd want to do some investigating in regards to what happens if we remove the exit (or move it elsewhere). I think in this case we do want it to exit with a status code of 1, but it'd be ideal if we could finish running the tasks. In short, I think this could be fixed/improved. I'll take a look at it. |
Steps to reproduce
Add this to a default capistrano project. Do not create .env on the server.
Edit:
Fixed rending_hook typo
Then run deploy command.
Expected behavior
The deploy will fail at deploy:check for .env file, then the ending hook will be fired for either deploy:failed or deploy:finished.
Actual behavior
The build stops but no ending hooks are fired.
System configuration
Environment
Gems
The text was updated successfully, but these errors were encountered: