Commit 7b9aa874 authored by mig5's avatar mig5 Committed by mig5
Browse files

#565012 - check drushrc.php exists on platform before trying to make it writable

parent d76e8612
......@@ -122,11 +122,16 @@ function provision_drush_command() {
* Generate a provision.settings.php file to configure provision
*/
function _provision_generate_config() {
drush_log(dt("Generating drushrc.php file"));
provision_path("chmod", drush_get_option('docroot_path') . '/drushrc.php', 0600,
dt('Changed permissions of drushrc.php to @confirm'),
dt('Could not change permissions of drushrc.php to @confirm'));
$exists = provision_path_exists(drush_get_option('docroot_path') . '/drushrc.php');
if ($exists) {
drush_log(dt("Found existing drushrc.php file"));
provision_path("chmod", drush_get_option('docroot_path') . '/drushrc.php', 0600,
dt('Changed permissions of drushrc.php to @confirm'),
dt('Could not change permissions of drushrc.php to @confirm'));
}
else {
drush_log(dt("Generating drushrc.php file"));
}
provision_save_platform_data();
provision_path("chmod", drush_get_option('docroot_path') . '/drushrc.php', 0400,
dt('Changed permissions of drushrc.php to @confirm'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment