diff --git a/php/commands/core.php b/php/commands/core.php
index <HASH>..<HASH> 100644
--- a/php/commands/core.php
+++ b/php/commands/core.php
@@ -238,19 +238,16 @@ class Core_Command extends WP_CLI_Command {
 
 	private static function _extract( $tarball_or_zip, $dest ) {
 		$path_parts = pathinfo( $tarball_or_zip );
-		$extension  = strtolower( $path_parts['extension'] );
 
-		switch ( $extension ) {
-			case 'zip':
-				self::_extract_zip( $tarball_or_zip, $dest );
-				break;
-			case 'tar.gz':
-				self::_extract_tarball( $tarball_or_zip, $dest );
-				break;
-			default;
-				WP_CLI::error( sprintf( 'Extension %s not supported.', $extension ) );
-				break;
+		if ( preg_match( '/\.zip$/', $tarball_or_zip ) ) {
+			return self::_extract_zip( $tarball_or_zip, $dest );
 		}
+
+		if ( preg_match( '/\.tar\.gz$/', $tarball_or_zip ) ) {
+			return self::_extract_tarball( $tarball_or_zip, $dest );
+		}
+
+		WP_CLI::error( sprintf( 'Extension %s not supported.', $extension ) );
 	}
 
 	private static function _extract_tarball( $tarball, $dest ) {
Check for extension type, and return an error if the extension is not supported.