I've built a CMD Windows batch file and when I execute it, the script exits after the first command regardless of whether or not it was successful. e.g.

drush dl advanced_help
drush en advanced_help

Any thoughts? I'm trying to make a batch file that will download Drupal and install/enable all of the modules I use.

Comments

mlconnor’s picture

Status: Active » Closed (fixed)

Turns out that in order to call batch files (e.g. drush.bat) from within a batch file, you have to use the CALL command or it will exit after execution. I changed my batch file up to call into the Drush PHP script directly instead...

set DRUSH=c:\native\wamp\bin\php\php5.2.6\php.exe drush.php -l http://localhost/s1 -r c:\native\wamp\www\s1

%DRUSH% dl advanced_help
%DRUSH% en advanced_help

%DRUSH% dl panels
%DRUSH% en panels
mstrelan’s picture

Version: » All-versions-4.x-dev

Even easier ...

set drush=call drush

%DRUSH% dl advanced_help
%DRUSH% en advanced_help

%DRUSH% dl panels
%DRUSH% en panels