Skip to content

"Inherit" option does not appear to apply to nested folders below config file #74

@runofthemill

Description

@runofthemill

Given a Trellis/Bedrock project with the following folder structure:

.
├── wp-cli.local.yml
├── site
│   ├── wp-cli.yml
│   └── web
│       ├── app
│       │   ├── themes
│       │   ├── upgrade
│       │   └── uploads
│       └── wp
│           ├── wp-admin
│           ├── wp-content
│           └── wp-includes
└── trellis
# wp-cli.local.yml
@dev:
  ssh: vagrant@example.test/srv/www/example.com/current
  path: web/wp
# wp-cli.yml
path: web/wp

_:
  inherit: ../wp-cli.local.yml

I would expect the alias @dev to be available in any folder below /site

# ./site
$ wp cli alias
---
@all: Run command against every registered alias.
@otherdev:
  ssh: vagrant@otherexample.test/srv/www/otherexample.com/current
@dev:
  path: web/wp
  ssh: vagrant@example.test/srv/www/example.com/current

$ wp --info
OS:	Darwin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
Shell:	/usr/local/bin/zsh
PHP binary:	/usr/local/Cellar/php/7.2.10/bin/php
PHP version:	7.2.10
php.ini used:	/usr/local/etc/php/7.2/php.ini
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	/Users/jeremy/Projects/example.com/site
WP-CLI packages dir:	/Users/jeremy/.wp-cli/packages/
WP-CLI global config:	/Users/jeremy/.wp-cli/config.yml
WP-CLI project config:	/Users/jeremy/Projects/example.com/site/wp-cli.yml
WP-CLI version:	2.0.1

# ./site/web/app/themes/mytheme/
$ wp cli alias
---
@all: Run command against every registered alias.
@otherdev:
  ssh: vagrant@otherexample.test/srv/www/otherexample.com/current

$ wp @dev --info
Error: Alias '@dev' not found.
Did you mean '@otherdev'?

$ wp --info
OS:	Darwin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
Shell:	/usr/local/bin/zsh
PHP binary:	/usr/local/Cellar/php/7.2.10/bin/php
PHP version:	7.2.10
php.ini used:	/usr/local/etc/php/7.2/php.ini
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	/Users/jeremy/Projects/example.com/site/web/app/themes/mytheme
WP-CLI packages dir:	/Users/jeremy/.wp-cli/packages/
WP-CLI global config:	/Users/jeremy/.wp-cli/config.yml
WP-CLI project config:	/Users/jeremy/Projects/example.com/site/wp-cli.yml
WP-CLI version:	2.0.1

Given WP-CLI shows the same project config, and the alias works in the folder the config is in, it seems the "inherit" option is not read/discovered from above the current working directory.

This is an atypical use case, and obviously not a standard WP install, so let me know if there's a "default" local dev setup you'd like me to try.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions