Update shell.js

This commit is contained in:
Namhyeon Go 2023-09-21 15:08:52 +09:00 committed by GitHub
parent f22364b2f9
commit 2b27f369bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,16 +96,18 @@ var ShellObject = function() {
console.log("ShellObject.exec() ->", c);
sleep(1);
this.stdout.loadFromFile(this.stdout.path, this.charset);
this.stderr.loadFromFile(this.stderr.path, this.charset);
this.stdout.reload(this.charset);
this.stderr.reload(this.charset);
stdout = (function(s) {
return s.length > 3 ? s.substring(3) : '';
return s.length > 1 ? s.substring(1) : '';
})(this.stdout.read());
stderr = (function(s) {
return s.length > 3 ? s.substring(3) : '';
return s.length > 1 ? s.substring(1) : '';
})(this.stderr.read());
//stdout = this.stdout.read();
//stderr = this.stderr.read();
//console.log("[stdout] " + stdout);
//console.log("[stderr] " + stderr);