cli error: TypeError: Object #<Master> has no method 'pidof' #145

Closed
alefnula opened this Issue Aug 18, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@alefnula

This happens always when I try any cli command. I suspect this is because of the next thing:

pidfiles.js

40 return function(master){
41    dir = master.pidfiles = master.resolve(dir || 'pids');
42    mkdir(dir, 0755, function(err){
43      if (err) throw err;
44
45      // augment master
46      master.pidof = function(name){

I think this is because of the next scenario: When the function mkdir is executed, the function returns so the next plugin (cli) is initialized. So before the mkdir callback starts executing the cli plugin is running, and the pidof function is still not set on the master.

@tj tj closed this in a1587ca Aug 18, 2011

@tj

This comment has been minimized.

Show comment
Hide comment
@tj

tj Aug 18, 2011

Member

thanks man

Member

tj commented Aug 18, 2011

thanks man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment