pinokiod 3.19.36 → 3.19.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/shell.js +12 -0
- package/package.json +1 -1
package/kernel/shell.js
CHANGED
|
@@ -569,6 +569,15 @@ class Shell {
|
|
|
569
569
|
// let m = params.message + delimiter + `echo "FINISHED: ${params.message}"\r\n`
|
|
570
570
|
// return m
|
|
571
571
|
} else if (Array.isArray(params.message)) {
|
|
572
|
+
|
|
573
|
+
let message = []
|
|
574
|
+
for(let i=0; i<params.message.length; i++) {
|
|
575
|
+
message.push(params.message[i])
|
|
576
|
+
message.push(`echo #${i}`)
|
|
577
|
+
}
|
|
578
|
+
params.message = message
|
|
579
|
+
|
|
580
|
+
|
|
572
581
|
// params.message.push(`echo "SHELL FINISHED RUNNING"\r\n`)
|
|
573
582
|
// if params.message is empty, filter out
|
|
574
583
|
//let delimiter = " && "
|
|
@@ -975,7 +984,9 @@ class Shell {
|
|
|
975
984
|
}
|
|
976
985
|
async exec(params) {
|
|
977
986
|
params = await this.activate(params)
|
|
987
|
+
console.log("#Exec 1", { params })
|
|
978
988
|
this.cmd = this.build(params)
|
|
989
|
+
console.log("#Exec 2", { cmd: this.cmd })
|
|
979
990
|
let res = await new Promise((resolve, reject) => {
|
|
980
991
|
this.resolve = resolve
|
|
981
992
|
this.reject = reject
|
|
@@ -1252,6 +1263,7 @@ ${cleaned}
|
|
|
1252
1263
|
this.params.onready()
|
|
1253
1264
|
}
|
|
1254
1265
|
if (this.ptyProcess) {
|
|
1266
|
+
console.log("ptyProcess.write", { cmd: this.cmd, eol: this.EOL })
|
|
1255
1267
|
this.ptyProcess.write(`${this.cmd}${this.EOL}`)
|
|
1256
1268
|
// setTimeout(() => {
|
|
1257
1269
|
// this.ptyProcess.write('\x1B[?2004h');
|