Browse Source

use shell-quote to parse command arguments

pull/2/head
Brett Langdon 12 years ago
parent
commit
b49757eb92
2 changed files with 4 additions and 2 deletions
  1. +2
    -1
      lib/index.js
  2. +2
    -1
      package.json

+ 2
- 1
lib/index.js View File

@ -1,5 +1,6 @@
var colors = require('colors');
var path = require('path');
var parse = require('shell-quote').parse;
var spawn = require('child_process').spawn;
var watch = require('watch');
@ -11,7 +12,7 @@ module.exports.tend = function(dir, rawCommand, options) {
var ignoreHidden = options.ignoreHidden === true;
var restart = options.restart === true;
var args = rawCommand.split(' ');
var args = parse(rawCommand);
var command = args.shift();
var executor = null;
var timeout = null;


+ 2
- 1
package.json View File

@ -26,7 +26,8 @@
"dependencies": {
"watch": "~0.10.0",
"docopt": "~0.4.0",
"colors": "~0.6.2"
"colors": "~0.6.2",
"shell-quote": "^1.4.1"
},
"bin": {
"tend": "bin/tend"


Loading…
Cancel
Save