kopia lustrzana https://github.com/c9/core
fix +10358: Object Error has no method 'indexOf'
rodzic
5a65f80f47
commit
b3c84e12a8
|
@ -1903,6 +1903,8 @@ module.exports = function setup(fsOptions) {
|
||||||
|
|
||||||
if (!attach) {
|
if (!attach) {
|
||||||
meta.pty.on("data", function wait(data){
|
meta.pty.on("data", function wait(data){
|
||||||
|
if (data)
|
||||||
|
meta.pty.removeListener("data", wait);
|
||||||
// Look for error states in plain text from tmux
|
// Look for error states in plain text from tmux
|
||||||
if (data.indexOf("can't create socket") > -1) {
|
if (data.indexOf("can't create socket") > -1) {
|
||||||
var err = new Error(data);
|
var err = new Error(data);
|
||||||
|
@ -1910,9 +1912,6 @@ module.exports = function setup(fsOptions) {
|
||||||
err.code = "EPERM";
|
err.code = "EPERM";
|
||||||
meta.pty.emit("data", err);
|
meta.pty.emit("data", err);
|
||||||
}
|
}
|
||||||
else if (data) {
|
|
||||||
meta.pty.removeListener("data", wait);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue