OSDN Git Service
(root)
/
wvm
/
wvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44cfc2a
)
fix WP_CLI::error() not exiting
author
scribu
<mail@scribu.net>
Fri, 8 Feb 2013 02:14:44 +0000
(
04:14
+0200)
committer
scribu
<mail@scribu.net>
Fri, 8 Feb 2013 02:14:44 +0000
(
04:14
+0200)
php/class-wp-cli.php
patch
|
blob
|
history
tests/spec-core.php
patch
|
blob
|
history
diff --git
a/php/class-wp-cli.php
b/php/class-wp-cli.php
index
02f65c2
..
ad70c61
100644
(file)
--- a/
php/class-wp-cli.php
+++ b/
php/class-wp-cli.php
@@
-136,8
+136,7
@@
class WP_CLI {
fwrite( STDERR, \cli\Colors::colorize( $msg, self::get_config('color') ) );
}
- if ( $exit )
- exit(1);
+ exit(1);
}
/**
diff --git
a/tests/spec-core.php
b/tests/spec-core.php
index
90a83bd
..
d7dab9e
100644
(file)
--- a/
tests/spec-core.php
+++ b/
tests/spec-core.php
@@
-40,6
+40,7
@@
class CoreCommandSpec extends WP_CLI_Spec {
->when( 'invoking', '' )
->then( 'return code should be', 1 )
->and( 'stderr', "Error: Can’t select database\n" )
+ ->and( 'stdout', '' )
->when( 'invoking', 'db create' )
->then( 'return code should be', 0 );