Skip to content

Commit dbb97f8

Browse files
committed
Use the current or release directory for execute drush
1 parent d86a85a commit dbb97f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

recipes/drupal8.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@
3030
}
3131

3232
// Skip when there are no tables in the database.
33-
if (test('[[ -z "$(./vendor/bin/drush sql:query \'SHOW TABLES\')" ]]')) {
33+
if (test('[[ -z "$({{release_or_current_path}}/vendor/bin/drush sql:query \'SHOW TABLES\')" ]]')) {
3434
writeln("<fg=yellow;options=bold;>Warning: </><fg=yellow;>Your database is empty! Skipping...</>");
3535
return;
3636
}
3737

3838
$destination = has('previous_release') ? '{{previous_release}}' : '{{release_path}}';
3939
run("mkdir -p $destination/config/backup");
40+
4041
cd('{{release_or_current_path}}');
41-
run("./vendor/bin/drush -y config:export --destination=$destination");
42+
run("{{release_or_current_path}}/vendor/bin/drush -y config:export --destination=$destination");
4243
writeln('Backup saved to ' . $destination);
4344
});
4445
before('deploy:drush', 'drush:config:backup');

0 commit comments

Comments
 (0)