Open Roy-Orbison opened 1 year ago
Thanks for the report, @Roy-Orbison !
We can definitely try to fix up the URL syntaxes you think are broken. I'm having a little bit of a hard time grokking your report, though. Which syntaxes would you like to see supported?
In this docs section, it states that adding a module is done like so, the last parameter looking like a typical Git URL:
wp package install git@github.com:wp-cli/dist-archive-command.git
These all failed:
https://github.com/wp-cli/search-replace-command.git
github:wp-cli/search-replace-command.git
(where github:
is an SSH alias that sets the user and selects the SSH key)github:wp-cli/search-replace-command.git:dev-main
(trying to select correct branch)https://github.com/wp-cli/search-replace-command.git:dev-main
What worked was wp-cli/search-replace-command:dev-main
, which I gleaned from this issue comment where someone else had encountered the invalid default branch dev-master
.
You don't necessarily have to support those URL types, more that the docs didn't match the experience, so maybe something needs to be updated.
Thanks, @Roy-Orbison.
I think we should:
In honestly, what's most likely is that the additional URL patterns weren't considered when the feature was created.
Feel free to submit a pull request, if you'd like. Here is some guidance on our pull request best practices.
Bug Report
Describe the current, buggy behavior
I read the contributing guidlines for installing a command, but got an error that looked like a regression of the problem described in wp-cli/wp-cli#5602.
When trying to work around it with the
:dev-main
suffix, wp-cli baulked at thehttps:
scheme and the ssh aliasgithub:
(which shortens the usualgit@github.com
and selects the right key).Maybe I'm just doing it wrong but it seems like odd behaviour when supplying legitimate URLs that work with Git.
Describe how other contributors can replicate this bug
Install command using
wp package install ...
with an HTTP or ssh alias URL. It may do the same with the explicitgit@...
URL.See shell output below.
Describe what you expect as the correct outcome
Command to install as per docs, or docs are updated to new expected command.
It worked when I used
wp package install wp-cli/search-replace-command:dev-main
.Let us know what environment you are running this on
Provide additional context/screenshots
Shell output: