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

Configurable install path #11

Merged
merged 4 commits into from
Oct 2, 2016
Merged

Conversation

aaemnnosttv
Copy link
Owner

Per #10, it may be desirable to be able to pass the path to the install directory when creating a new install. This was always the intention by referencing the global --path flag internally.

However, what wasn't obvious is that WP-CLI strips all global options out of the $assoc_args passed to a subcommand. Even by defining it in the synopsis like core download it will still be stripped unless WP_CLI_STRICT_ARGS_MODE is enabled.

Rather than messing with this, it makes much more sense to just use a different option as the behavior is a bit different anyways.

This PR adds a --in=<dir> flag you can pass to valet new with a path to the desired install directory (ie: parent directory of the install). Because Valet uses the name of the install directory for the local domain name it is accessed with, the project directory will be installed inside the given path.

i.e. If you were to run wp valet new my-project --in=some/dir the install directory would then be: ./some/dir/my-project which would be accessed at https://my-project.dev

@aaemnnosttv aaemnnosttv added this to the 1.0.1 milestone Oct 2, 2016
Copy link

@dwillitzer dwillitzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected. Thank you for the addition.

@aaemnnosttv aaemnnosttv merged commit 8cec526 into master Oct 2, 2016
@aaemnnosttv aaemnnosttv deleted the fix/configurable-install-path branch October 2, 2016 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants