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

Only last plugin commands are executed #3

Open
Kloadut opened this issue Aug 9, 2013 · 2 comments
Open

Only last plugin commands are executed #3

Kloadut opened this issue Aug 9, 2013 · 2 comments

Comments

@Kloadut
Copy link

Kloadut commented Aug 9, 2013

I noticed that only alphabeticaly-last plugin commands can be executed, even if all of them are displayed on "help".

For example, with a fresh install of dokku:

$ pluginhook commands help
    logs <app>      Show the last logs for an application
    url <app>       Show the URL for an application
$  pluginhook commands url myapp  # Nginx plugin
    http://myapp.mydomain.com
$ pluginhook commands logs myapp  # 00_dokku-standard plugin
$ (no output)

By extension dokku logs myapp does not work on dokku ;)

This was referenced Aug 10, 2013
asm89 referenced this issue in dokku/dokku Aug 19, 2013
Plugin "commands" should end with "cat" because the output of each
plugin's command is piped through the next one by pluginhook
stephen-fanfair added a commit to stephen-fanfair/dokku-redis-plugin that referenced this issue Jan 22, 2014
stephen-fanfair added a commit to stephen-fanfair/dokku-mongo-plugin that referenced this issue Jan 22, 2014
@rvalyi
Copy link

rvalyi commented Sep 30, 2014

Hello, just some comments about this issue:

  1. the description doesn't feel right: as far as I tested: all hooks are called (not just the last one), but only the last hook will print anything to stdout.

  2. it's real and it may surprise you if you are not told.

  3. it seems it's not an implementation bug but this is by design: a hook get its stdout piped to the stdin of the next hook:
    https://github.com/progrium/pluginhook/blob/master/pluginhook.go#L43

  4. would there be a way from within the hook to escape this behavior? I see people putting a cat at the end of their hook. That may work but eventually you want to log at real time. Any other work around would be appreciated.

@michaelshobbs
Copy link

@progrium bump

does plugn work differently in this regard?

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

No branches or pull requests

3 participants