From ecf4f74cfc9be7aa61a66cecff1c41f98ca33a80 Mon Sep 17 00:00:00 2001 From: Brandon Lavigne Date: Wed, 6 Feb 2013 09:51:21 -0800 Subject: [PATCH] added success message if remote request code is 200 --- php/commands/scaffold.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/php/commands/scaffold.php b/php/commands/scaffold.php index baf9e8be..662fedee 100644 --- a/php/commands/scaffold.php +++ b/php/commands/scaffold.php @@ -163,6 +163,9 @@ class Scaffold_Command extends WP_CLI_Command { $tmpfname = wp_tempnam($url); $response = wp_remote_post( $url, array( 'timeout' => $timeout, 'body' => $body, 'stream' => true, 'filename' => $tmpfname ) ); + if ( $response['response']['code'] == 200 ) + WP_CLI::success( "Created theme '".$data['theme_name']."'." ); + unzip_file( $tmpfname, $theme_path ); unlink( $tmpfname ); -- 2.11.0