I would like to write an interceptor for for OnCLIStart, which is part of the CLI lifecycle.
But it turns out that I have the banner customizer CB module installed on this instance of commandBox (slug=commandbox-banner-customizer) and the OnCLIStart interceptor is registered in its ModuleConfig.cfc.
My “OnCLIStart()” interceptor isn’t firing.
Maybe I overlooked something else that would explain why my OnCLIStart() is not working…
Is it possible to have two modules that register the same interceptor?
Is there an easy way to determine which interceptors are already registered/defined? (short of going into the ModuleConfig.cfc files of every system package/module you’ve installed)
What is the best way to workaround this problem?:
I could write a custom interception point but I’d really like to have my interceptor fire when the CLI is loaded/reloaded. Short of modifying CommandBox core (system) modules to insert my custom interception points in the places I’d like them, I don’t see a way to do this.
I could use a different core interceptor (“preCommand” might work for my needs) but as I install more and more modules, the same problem could occur. Not to mention, I really don’t want my interceptor to fire before every command.
Thanks in advance,