Permalink
Browse files

opts.once to execute a command once in .spawn()

  • Loading branch information...
1 parent f875570 commit 9c54897ae338fca869144c0b0999082ac8e71960 @substack committed Mar 6, 2012
Showing with 6 additions and 2 deletions.
  1. +5 −1 index.js
  2. +1 −1 package.json
View
6 index.js
@@ -373,7 +373,11 @@ Propagit.prototype.drone = function (fn) {
ps.once('exit', function (code, sig) {
self.emit('exit', code, sig, opts);
- if (proc.status !== 'stopped') {
+
+ if (opts.once) {
+ delete self.processes[id];
+ }
+ else if (proc.status !== 'stopped') {
proc.status = 'respawning';
setTimeout(function () {
if (proc.status !== 'stopped') respawn();
View
2 package.json
@@ -1,7 +1,7 @@
{
"name" : "propagit",
"description" : "cascading multi-server git deployment",
- "version" : "0.4.7",
+ "version" : "0.4.8",
"repository" : {
"type" : "git",
"url" : "git://github.com/substack/propagit.git"

0 comments on commit 9c54897

Please sign in to comment.