Skip to content
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

Fix on exit not firing #617

Merged
merged 3 commits into from
May 9, 2018
Merged

Conversation

endorama
Copy link
Contributor

@endorama endorama commented May 7, 2018

This PR should address #555, restoring post-like behaviour for on_project_exit.

That behaviour was prevented by the unless attach? check, which AFAICT is not useful in this case.

endorama added 2 commits May 8, 2018 01:23
Fix tmuxinator#555 restoring `on_project_exit` hook behvaiour. Should have been a
replacement for `post` but was not working due to a failing check.
@ethagnawl
Copy link
Member

@endorama It's been a while since I looked at the linked issue. Might people have come to rely on the existing/"broken" behavior or is this only a bug fix?

@codezomb
Copy link

codezomb commented May 8, 2018

@ethagnawl the linked issue is requesting a bug fix. The issue describes that the current documented functionality does not work at all. At least, that's what it evolved into.

@endorama
Copy link
Contributor Author

endorama commented May 8, 2018

@ethagnawl AFAICT that functionality never worked as intended, and I don't think can be used like this.

But if you can provide some more informations on the attach? method this should be clearer.

My intent with the unless attach? check was to avoid that multiple shell connected to the same tmux instance would each trigger the on_project_exit hook on session detach. With that check instead the on_project_exit is never triggered, and I would consider this a bug.

@ethagnawl
Copy link
Member

I just reviewed the linked thread and tested this locally. I can confirm that everything appears to be working as expected: on_project_exit is run (once) on tmux detach, C-d and tmux kill-session ....

This fix gets a 👍 from me.

Any thoughts, @adamstrickland?

add whitespace before hook_on_project_exit
@ethagnawl ethagnawl merged commit 30d28da into tmuxinator:master May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants