Making WordPress.org

Changeset 3053


Ignore:
Timestamp:
04/30/2016 09:56:34 AM (10 years ago)
Author:
ocean90
Message:

Translate, Plugin Directory: Use WP_CLI::error() instead of WP_CLI::line() followed by an exit().

https://github.com/wp-cli/wp-cli/issues/2386 was fixed in v0.23.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-plugin-directory/inc/cli/class-set-plugin-project.php

    r3052 r3053  
    3737    public function __invoke( $args, $assoc_args ) {
    3838        if ( ! preg_match( '/^[^\/]+$/', $args[0] ) ) {
    39             WP_CLI::line( sprintf( "The plugin slug '%s' contains invalid characters.", $args[0] ) );
    40             exit( 1 );
     39            WP_CLI::error( sprintf( "The plugin slug '%s' contains invalid characters.", $args[0] ), 1 );
    4140        }
    4241
     
    4847        $master_project = GP::$project->by_path( $this->master_project_path );
    4948        if ( ! $master_project ) {
    50             WP_CLI::line( sprintf( "The master project '%s' couldn't be found.", $this->master_project_path ) );
    51             exit( 2 );
     49            WP_CLI::error( sprintf( "The master project '%s' couldn't be found.", $this->master_project_path ), 2 );
    5250        }
    5351
     
    8684            $plugin_project = GP::$project->create_and_select( $project_args );
    8785            if ( ! $plugin_project ) {
    88                 WP_CLI::line( "Couldn't create project for {$plugin_project_path}." );
    89                 exit( 5 );
     86                WP_CLI::error( "Couldn't create project for {$plugin_project_path}.", 5 );
    9087            }
    9188        } else {
Note: See TracChangeset for help on using the changeset viewer.