Skip to content

Commit

Permalink
Merge pull request #76 from 10up/feature/suppress-instructions
Browse files Browse the repository at this point in the history
Suppress instructions after pull completion
  • Loading branch information
tlovett1 committed Sep 30, 2020
2 parents 97ac323 + 02b306f commit ddda6b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file, per [the Ke
## [2.1.0] - TBD
### Added
- `--overwirte_local_copy` flag to the `pull` command.
- `--suppress_instructions` flag to the `pull` command.
- `--format` option to the search command that accepts json and table values.

### Changed
Expand Down
3 changes: 2 additions & 1 deletion src/classes/Command/Pull.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected function configure() {
$this->addOption( 'confirm_wp_version_change', null, InputOption::VALUE_OPTIONAL, 'Confirm changing WP version to match snapshot.', false );
$this->addOption( 'confirm_ms_constant_update', null, InputOption::VALUE_NONE, 'Confirm updating constants in wp-config.php for multisite.' );

$this->addOption( 'suppress_instructions', null, InputOption::VALUE_NONE, 'Suppress instructions after successful installation.' );
$this->addOption( 'overwrite_local_copy', null, InputOption::VALUE_NONE, 'Overwrite a local copy of the snapshot if there is one.' );
$this->addOption( 'include_files', null, InputOption::VALUE_OPTIONAL, 'Pull files within snapshot.', false );
$this->addOption( 'include_db', null, InputOption::VALUE_OPTIONAL, 'Pull database within snapshot.', false );
Expand Down Expand Up @@ -865,7 +866,7 @@ function( $answer ) {

Log::instance()->write( 'Pull finished.', 0, 'success' );

if ( $pull_db ) {
if ( $pull_db && empty( $input->getOption( 'suppress_instructions' ) ) ) {
Log::instance()->write( 'Visit in your browser: ' . $first_home_url, 0, 'success' );

if ( 'localhost' !== parse_url( $first_home_url, PHP_URL_HOST ) ) {
Expand Down

0 comments on commit ddda6b3

Please sign in to comment.