Skip to content

Commit

Permalink
Merge pull request #5 from gtg092x/verbosityfix
Browse files Browse the repository at this point in the history
removed verbose help, too verbose
  • Loading branch information
gtg092x committed Nov 14, 2014
2 parents 2a27960 + 5e14624 commit 14ea2f6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ node_modules
.idea
cache
test/test.js
test
test
.DS_Store
6 changes: 5 additions & 1 deletion lib/WP.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ var isFunction = function(func){
}

WP.discover = function(options,cb){




if(!cb){
cb=options;
options={};
}

var verbose = options.verbose===undefined?false:options.verbose;
delete options.verbose;

var wp = new WP(_.clone(options));

Expand Down
8 changes: 5 additions & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ module.exports.wp = function(use,args,flags,cb){
}


var helpIfError = function(e,out){
var helpIfError = function(e,out){//this is too verbose - should look into formatting help
if(!e)
return cb(e,out);
exec("wp help "+use.join(" "),function(err,stdout,stderr){
/*exec("wp help "+use.join(" "),function(err,stdout,stderr){
if(!err)
cb(e+"\n\n"+stdout,out);
else
cb(e,out);
});
});*/
// shelve this for now
cb(e,out);
};


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-cli",
"version": "0.0.3",
"version": "0.0.4",
"description": "Node Wrapper for Wordpress CLI",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 14ea2f6

Please sign in to comment.