Skip to content

For Github archive URLs use the Github project name as the plugin directory.#81

Merged
schlessera merged 1 commit intomasterfrom
issue-80-github-url-misread-archive
Jan 24, 2018
Merged

For Github archive URLs use the Github project name as the plugin directory.#81
schlessera merged 1 commit intomasterfrom
issue-80-github-url-misread-archive

Conversation

@gitlost
Copy link
Contributor

@gitlost gitlost commented Jan 24, 2018

Closes #80

Uses the Github project name as a guess for the plugin directory when given an archive URL (which the current code attempts but fails when there's an intervening version in the URL).

Refactors the code to be more explicit about what it's doing.

Also unrelatedlly fixes typo "ambigious" -> "ambiguous" and cleans up some tests.

Re not using composer.json or reading the plugin info, there is actually nothing in WP that says what the plugin directory should be, apart from the directory in the zip. So the functionality here is just a workaround for Github zip's not having the correct directory.

A better solution would be to have an option to say what the plugin directory should be, but this will have to be formulated to deal with multiple installs (in some fashion or other) so will have to wait for the moment.

@gitlost gitlost added bug command:plugin-install Related to 'plugin install' command command:theme-install Related to 'theme install' command labels Jan 24, 2018
@gitlost gitlost added this to the 1.1.9 milestone Jan 24, 2018
@schlessera schlessera merged commit 2ecec9a into master Jan 24, 2018
@schlessera schlessera deleted the issue-80-github-url-misread-archive branch January 24, 2018 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug command:plugin-install Related to 'plugin install' command command:theme-install Related to 'theme install' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin install takes wrong name from github URL & renames plugin to 'archive'

2 participants