Skip to content

Commit c478e17

Browse files
committed
fix(drush): fixes #44
1 parent a3f4cf0 commit c478e17

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

kalatheme.drush.inc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@ function drush_kalatheme($name = NULL) {
126126
// Write the custom bootstrap library if applicable
127127
$current_dir = getcwd();
128128
chdir($dtemp);
129-
if (($theme_settings['bootstrap_library'] == 'custom') && ($filepath = drush_download_file($custom))) {
129+
if (($theme_settings['bootstrap_library'] == 'custom')) {
130+
$filepath = drush_download_file($custom);
131+
if (empty($filepath)) {
132+
drush_print(dt('Could not download custom library.'));
133+
return;
134+
}
130135
$filename = basename($filepath);
131136
$dirname = basename($filepath, '.zip');
132137
$library_name = $machine_name . '_bootstrap';
@@ -140,10 +145,7 @@ function drush_kalatheme($name = NULL) {
140145
drush_op('kalatheme_custom_bootstrap_library_integrate', $files, $machine_name, $dtemp, $lib_tmp_directory, $sub_tmp_directory, !$no_magic);
141146
drush_move_dir($lib_tmp_directory, $library_path, FILE_EXISTS_OVERWRITE);
142147
}
143-
else {
144-
drush_print(dt('Could not download custom library.'));
145-
return;
146-
}
148+
147149
// Return
148150
chdir($current_dir);
149151
// Move the subtheme into the right directory

0 commit comments

Comments
 (0)