boonebgorges / wp-cli-git-helper

Git helper for wp-cli
35 stars 5 forks source link

'gh' is not a registered wp command #9

Closed adamwalter closed 7 years ago

adamwalter commented 7 years ago

I tried installing this package via wp package install using both the package name and the Git URL to this repo, but it is not working.

$ wp package install boonebgorges/wp-cli-git-helper
Installing package boonebgorges/wp-cli-git-helper (dev-master)
Updating /Users/adam/.wp-cli/packages/composer.json to require the package...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
$ wp gh
Error: 'gh' is not a registered wp command. See 'wp help'.

I've tried new bash sessions and different WP sites, to no avail. I am seeing the package in my composer.json under both require and repositories, but I do not see the package in my vendors directory.

Any idea what's up?

boonebgorges commented 7 years ago

Hey @adamwalter - Sorry for the troubles. The Composer requirements work weirdly in this command because of some dependencies I'm trying (unsuccessfully, it seems) to build between different wp-cli commands. For the time being, you should be able to work around it by putting the following into your ~/.wp-cli/config.yml file:

require:
  - /yourhomedir/.wp-cli/commands/vendor/boonebgorges/wp-cli-git-helper.php

Sorry for the trouble. I will try to figure this out when I get a chance.

adamwalter commented 7 years ago

No luck. That file doesn't exist for me after installation. Not really sure what's up. How would one go about installing this without using wp package install?

boonebgorges commented 7 years ago

Does "that file" mean ~/.wp-cli/config.yml? If it doesn't exist, then create it.

adamwalter commented 7 years ago

No, .wp-cli/commands/vendor/boonebgorges/wp-cli-git-helper.php.

screen shot 2017-01-02 at 1 57 11 pm

boonebgorges commented 7 years ago

Ah. Clone this repo somewhere - say, ~/.wp-cli/commands/wp-cli-git-helper - and replace the require path with the correct path.

adamwalter commented 7 years ago

Okay, I've got it in there. However, now WP-CLI returns nothing when I try wp gh or even a core command like wp plugin list. Sorry!

boonebgorges commented 7 years ago

It sounds like you might be getting a fatal error, maybe because you're now loading the package more than once. Check your error logs.

On 01/02/2017 02:10 PM, Adam Walter wrote:

Okay, I've got it in there. However, now WP-CLI returns nothing when I try |wp gh| or even a core command like |wp plugin list|. Sorry!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boonebgorges/wp-cli-git-helper/issues/9#issuecomment-270015363, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPDYyiKnLI30W2v44cI87rOe3ozF33qks5rOVmxgaJpZM4LMIp6.

adamwalter commented 7 years ago

My apologies. I discovered that I was having an Allowed memory size exhausted error behind the scenes due to my Mac's CLI PHP settings.

Your package is the first one that needed > 128M of memory to install, so I had never had a problem installing packages before. This led me to direct my focus on the package and not my system. Thanks for the help regardless!

boonebgorges commented 7 years ago

Glad it's working!