Skip to content

Commit 7a2e89e

Browse files
author
Mostafa Eweda
committed
Merge pull request #2559 from Pike/to-upstream
upstream two fixes
2 parents 4f21867 + e95af6e commit 7a2e89e

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

plugins-server/cloud9.ide.filelist/filelist.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = function() {
5050
if (err || !meta.process)
5151
return onExit(1, err);
5252

53-
var stderr = "";
53+
var stderr = "", gotExitCode = false, gotClose = false;
5454
meta.process.stdout.on("data", function(data) {
5555
onData(data);
5656
});
@@ -60,7 +60,21 @@ module.exports = function() {
6060
});
6161

6262
meta.process.on("exit", function(code) {
63-
onExit(code, stderr);
63+
if (gotClose) {
64+
onExit(code, stderr);
65+
}
66+
else {
67+
gotExitCode = code;
68+
}
69+
});
70+
71+
meta.process.stdout.on("close", function(code) {
72+
if (gotExitCode !== false) {
73+
onExit(gotExitCode, stderr);
74+
}
75+
else {
76+
gotClose = true;
77+
}
6478
});
6579
});
6680
};

plugins-server/cloud9.ide.hg/hg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ util.inherits(HgPlugin, Plugin);
114114
}
115115
};
116116

117-
out.replace(/([\w]+)[\s]{3,5}([\w].+)\n/gi, function(m, sub, hint) {
117+
out.replace(/([\w]+)[\s]{3,9}([\w].+)\n/gi, function(m, sub, hint) {
118118
if (self.banned.indexOf(sub) > -1)
119119
return;
120120
hghelp.hg.commands[sub] = self.augmentCommand(sub, {"hint": hint});

plugins-server/cloud9.run.other/other.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

3+
var util = require("util");
34
var c9util = require("../cloud9.core/util");
45
var ShellRunner = require("../cloud9.run.shell/shell").Runner;
56

@@ -30,9 +31,10 @@ exports.factory = function(vfs) {
3031
};
3132
};
3233

33-
var Runner = exports.Runner = ShellRunner;
34+
var Runner = exports.Runner = function(vfs, options, callback) {
35+
ShellRunner.call(this, vfs, options, callback);
36+
};
3437

35-
for (var prop in ShellRunner.prototype)
36-
Runner.prototype[prop] = ShellRunner.prototype[prop];
38+
util.inherits(Runner, ShellRunner);
3739

3840
Runner.prototype.name = "other";

0 commit comments

Comments
 (0)