Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The latest provision is causing upgrades to DevShop to fail, and I FINALLY figured out why!
if (d()->profile != 'hostmaster') {
}
Since some of us extend Aegir by using our own drupal profile, we cannot check against d()->profile.
I dealt with a similar issue in #2704291: Verify of a site with function "hosting_get_features" overwrites the `~/.drush/drushrc.php` file..
Instead, let's check that the root and URI match those for @hostmaster alias. That was we can be absolutely sure we dealing with the "@hostmaster" site.
if (!(d()->root == d('@hostmaster')->root && d()->uri == d('@hostmaster')->uri)) {
}
Comment | File | Size | Author |
---|---|---|---|
#3 | 2826388-check-hostmaster.patch | 2.05 KB | Jon Pugh |
Comments
Comment #2
Jon PughComment #3
Jon PughComment #5
Jon PughComment #6
helmo CreditAttribution: helmo as a volunteer and at Initfour websolutions for Aegir Cooperative commentedCheck in https://github.com/aegir-project/provision/pull/10 is green and it makes sense.
So +1 ... but we could improve it a bit by adding a utility function e.g. 'provision_is_hostmaster_site()'
Comment #8
Jon PughGreat idea, done!
Comment #10
Jon Pugh