Update shell.js

This commit is contained in:
Namhyeon Go 2023-09-21 10:59:22 +09:00 committed by GitHub
parent c9c6d87803
commit 7acb695877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;