1 | var common = require('./common');
|
2 |
|
3 | //@
|
4 | //@ ### error()
|
5 | //@ Tests if error occurred in the last command. Returns a truthy value if an
|
6 | //@ error returned and a falsy value otherwise.
|
7 | //@
|
8 | //@ **Note**: do not rely on the
|
9 | //@ return value to be an error message. If you need the last error message, use
|
10 | //@ the `.stderr` attribute from the last command's return value instead.
|
11 | function error() {
|
12 | return common.state.error;
|
13 | }
|
14 | module.exports = error;
|