mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 13:41:05 +00:00
Update shell.js
This commit is contained in:
parent
c9c6d87803
commit
7acb695877
|
@ -76,6 +76,8 @@ var ShellObject = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.exec = function(cmd, stdOutPath, stdErrPath) {
|
this.exec = function(cmd, stdOutPath, stdErrPath) {
|
||||||
|
var stdout, stderr;
|
||||||
|
|
||||||
this.stdout = PipeIPC.connect("volatile");
|
this.stdout = PipeIPC.connect("volatile");
|
||||||
this.stderr = PipeIPC.connect("volatile");
|
this.stderr = PipeIPC.connect("volatile");
|
||||||
|
|
||||||
|
@ -97,10 +99,10 @@ var ShellObject = function() {
|
||||||
this.stdout.loadFromFile(this.stdout.path, this.charset);
|
this.stdout.loadFromFile(this.stdout.path, this.charset);
|
||||||
this.stderr.loadFromFile(this.stderr.path, this.charset);
|
this.stderr.loadFromFile(this.stderr.path, this.charset);
|
||||||
|
|
||||||
var stdout = (function(s) {
|
stdout = (function(s) {
|
||||||
return s.length > 3 ? s.substring(3) : '';
|
return s.length > 3 ? s.substring(3) : '';
|
||||||
})(this.stdout.read());
|
})(this.stdout.read());
|
||||||
var stderr = (function(s) {
|
stderr = (function(s) {
|
||||||
return s.length > 3 ? s.substring(3) : '';
|
return s.length > 3 ? s.substring(3) : '';
|
||||||
})(this.stderr.read());
|
})(this.stderr.read());
|
||||||
|
|
||||||
|
@ -206,7 +208,7 @@ exports.getPathOfMyDocuments = function() {
|
||||||
return (new ShellObject()).getPathOfMyDocuments();
|
return (new ShellObject()).getPathOfMyDocuments();
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.VERSIONINFO = "Shell interface (shell.js) version 0.3.2";
|
exports.VERSIONINFO = "Shell interface (shell.js) version 0.3.3";
|
||||||
exports.AUTHOR = "abuse@catswords.net";
|
exports.AUTHOR = "abuse@catswords.net";
|
||||||
exports.global = global;
|
exports.global = global;
|
||||||
exports.require = global.require;
|
exports.require = global.require;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user