Skip to content

Commit

Permalink
[fix] Fix cli.start regex to match .* instead of .+
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki authored and indexzero committed Nov 23, 2011
1 parent 89969ef commit 1da249c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions lib/forever/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,32 @@ app.cmd('columns set :value', cli.setColumns = function (value) {
forever.config.saveSync();
});

//
// ### function help ()
// Shows help
//
app.cmd('help', cli.help = function () {
util.puts(help.join('\n'));
});

//
// ### function start (file)
// #### @file {string} Location of the script to spawn with forever
// Starts a forever process for the script located at `file` as non-daemon
// process.
//
// Remark: this regex matches everything. It has to be added at the end to
// make executing other commands possible.
//
app.cmd(/(.*)/, cli.start = function (file) {
var options = getOptions(file);
tryStart(file, options, function () {
var monitor = forever.start(file, options);
monitor.on('start', function () {
forever.startServer(monitor);
});
});
});

cli.startCLI = function () {
app.init(function () {
Expand Down

0 comments on commit 1da249c

Please sign in to comment.