pinokiod 3.2.16 → 3.2.18
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 +4 -0
- package/package.json +1 -1
package/kernel/shell.js
CHANGED
|
@@ -675,6 +675,7 @@ class Shell {
|
|
|
675
675
|
this.done = false
|
|
676
676
|
this.ptyProcess = pty.spawn(this.shell, this.args, config)
|
|
677
677
|
this.ptyProcess.onData((data) => {
|
|
678
|
+
console.log("> onData", { done: this.done, data })
|
|
678
679
|
if (!this.done) {
|
|
679
680
|
this.queue.push(data)
|
|
680
681
|
}
|
|
@@ -691,6 +692,7 @@ class Shell {
|
|
|
691
692
|
return res
|
|
692
693
|
}
|
|
693
694
|
stop(message) {
|
|
695
|
+
console.log("STOP", { message })
|
|
694
696
|
return this.kill(message)
|
|
695
697
|
}
|
|
696
698
|
continue(message) {
|
|
@@ -705,6 +707,7 @@ class Shell {
|
|
|
705
707
|
}
|
|
706
708
|
}
|
|
707
709
|
kill(message, force) {
|
|
710
|
+
console.log("KILL", { message, force })
|
|
708
711
|
|
|
709
712
|
this.done = true
|
|
710
713
|
this.ready = false
|
|
@@ -837,6 +840,7 @@ ${cleaned}
|
|
|
837
840
|
let cached_msg = msg
|
|
838
841
|
// todo: may need to handle cases when the command returns immediately with no output (example: 'which brew' returns immediately with no text if brew doesn't exist)
|
|
839
842
|
setTimeout(() => {
|
|
843
|
+
console.log({ cache, cleaned })
|
|
840
844
|
if (cache === cleaned) {
|
|
841
845
|
if (this.persistent) {
|
|
842
846
|
if (this.cb) this.cb({
|