backdrop-contrib / backdrop-drush-extension

A set of commands and boot class for Drush and Backdrop CMS.
GNU General Public License v2.0
13 stars 18 forks source link

Fixed `drush dl module` command #201

Closed alanmels closed 4 years ago

alanmels commented 4 years ago

As explained in issue #200 the backdrop_pm_get_from_github() was not bulletproof to sometimes return empty result. The offered solution simplifies the backdrop_pm.drush.inc file's code and provides working functionality.

AlexShapka commented 4 years ago

Per @quicksketch's recommendation on gitter:

@alanmels but looking at the PR, I'd be concerned about using backticks for shell execution. I think that sort of execution would make the drush extension shell-sensitive. I don't think backtick exeuction would work in fish shell for example: https://github.com/fish-shell/fish-shell/issues/1481 If you could figure out why curl_exec()isn't working, I bet that would be preferable.

I will try to troubleshoot why curl_exec()isn't working today.

AlexShapka commented 4 years ago

The issue turned out to be about our company VPN firewall, that @alanmels was using when trying to download modules. Here is the difference between using our firewall and without it:

docker@cli:/var/www/docroot$ drush dl devel

    Error: There is no release located at https://github.com/backdrop-contrib/devel/releases/download//devel.zip.
    Try visiting the devel page directly: https://github.com/backdrop-contrib/devel

docker@cli:/var/www/docroot$ drush dl devel

    Success:  Project devel downloaded to /var/www/docroot/modules/devel.

docker@cli:/var/www/docroot$

We just need to adjust firewall rules at our end. So please disregard the PR.

alanmels commented 4 years ago

This is just to update that drush dl command fails intermittently even with firewall turned off. Please read https://github.com/backdrop-contrib/drush/issues/200#issuecomment-542896271