Skip to content

Commit

Permalink
gotta support numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
gtg092x committed May 13, 2014
1 parent edcf7bb commit 478a189
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
var exec = require('child_process').exec,util=require('util');

var isString = function(str){
return (typeof str == 'string' || str instanceof String);
}

var escapeshell = function(cmd) {
return '"'+cmd.replace(/(["\s'$`\\])/g,'\\$1')+'"';
};
if(isString(cmd))
return '"'+cmd.replace(/(["\s'$`\\])/g,'\\$1')+'"';
else
return '"'+cmd+'"';
};

module.exports.wp = function(args,flags,cb){

Expand Down

0 comments on commit 478a189

Please sign in to comment.