Closed (fixed)
Project:
Module Builder
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2010 at 17:42 UTC
Updated:
18 Apr 2011 at 14:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerWhat about invoking drush mb-download directly from there?
Comment #2
joachim commentedI just committed this which was kicking around in my local copy:
- return drush_set_error('DRUSH_NOT_COMPLETED', 'No hook definitions found. You need to download hook definitions before using this module.');
+ return drush_set_error("DRUSH_NOT_COMPLETED', 'No hook definitions found. You need to download hook definitions before using this module: see the command 'mbdl'.");
But yeah, your suggestions sounds good!
Comment #3
joachim commented> What about invoking drush mb-download directly from there?
A reason not to: you might want to specify where to save them.
Comment #4
aaronott commentedI ran into this as well so I thought, well what if we simply ask the user if they would like to download them now? This gives the user the option to download them in the default directory or saying no and doing the mb-download and specify their location.
Thoughts?
and here is the patch.
** edit **
This is a patch to drush/module_builder.drush.inc
Comment #5
aaronott commentednot sure why the patch didn't attach correctly. Let me try that again.
Comment #6
aaronott commentedA cleaner patch run from the base of the module. Could still probably ask if the user would like to save the hooks in the default location and allow them to specify a different location if No is chosen.
Comment #7
joachim commentedYou seem to have included changes for another issue...
I recommend branching for every issue to avoid this sort of problem, and diffing from the main branch :)
Comment #8
aaronott commentedThis would seem to be a case of being under-caffeinated. ;)
Here is a (dare I say) cleaner, cleaner patch.
Comment #9
joachim commentedCool.
I'll do some work in this on the train tomorrow maybe -- I reckon I'd like to resurrect _module_builder_check_settings() for this.
Comment #10
joachim commented... took me slightly longer to get to this than planned ;)
I've reworked this quite extensively to use exceptions, since they're the trendy thing and I needed to learn about them ;)
Also, they make a lot of sense here as the next step can be to have the GUI call _module_builder_sanity_check() and output dsm error messages with a link to the hook download page if needed.
Pushed to git -- can you give it a try?