Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drush dl sometimes does not pick up version #210

Open
rroseselavy42 opened this issue Nov 25, 2019 · 7 comments
Open

Drush dl sometimes does not pick up version #210

rroseselavy42 opened this issue Nov 25, 2019 · 7 comments
Assignees
Milestone

Comments

@rroseselavy42
Copy link

Hey folks,
Have a strange intermittent issue where drush dl will sometimes not pick up the latest version of a backdrop module. Instead it will give me an error such as below

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

this only happens intermittently and mostly when run scripted.

@serundeputy
Copy link
Member

thanks for reporting this @rroseselavy42

We have had other reports of the dl command intermittently failing ... let's try to nail it down and fix it here.

@serundeputy
Copy link
Member

serundeputy commented Nov 26, 2019

looks like I'm curling to a reg github url instead of the github api

https://github.com/backdrop-contrib/drush/blob/1.x-1.x/commands/pm/backdrop_pm.drush.inc#L121

        $html = backdrop_pm_get_from_github(
          "https://github.com/backdrop-contrib/$project/releases/latest"
        );

We should fix this to hit the API instead so redirects won't fail the dl command. Something like this:

curl -s https://api.github.com/repos/backdrop-contrib/rules/releases/latest

then refactor to parse the json result.

@serundeputy serundeputy added this to the 1.2.1 milestone Jan 19, 2020
@serundeputy serundeputy self-assigned this Jan 19, 2020
@bradbulger
Copy link

I'm getting an error today from drush dl:

Module is already installed ... exiting without re-writing module. [error]

Normally it would get the new version of the module (entity_plus in this case) and ask me if I want to overwrite the existing version. Whether a module is installed or not shouldn't matter, but I assume by "installed" it means "exists on the file system".

@serundeputy
Copy link
Member

@bradbulger if you are trying to update a module you should use drush up entity_plus

@bradbulger
Copy link

Sometimes you don't want to update, though. You want to download a different version from what's there. I can get around it by removing the directory, I just thought I remembered it working. I guess I must have been thinking of my experience using it with Drupal, where it will overwrite the existing directory after prompting (or with the -y flag). I believe this was a conversation at one point, around a bug filed against original Drush that dl should delete the old files (since files can go away between versions).

@serundeputy
Copy link
Member

@bradbulger file a new issue as a feature request please.

@rroseselavy42
Copy link
Author

just to update, this is now happening 100% of the time I think output has changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants