kernelsu 1.0.4 → 1.0.5
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/index.js +8 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -71,6 +71,9 @@ function Stdio() {
|
|
|
71
71
|
export function spawn(command, args, options) {
|
|
72
72
|
if (typeof args === "undefined") {
|
|
73
73
|
args = [];
|
|
74
|
+
} else if (typeof args === "object") {
|
|
75
|
+
// allow for (command, options) signature
|
|
76
|
+
options = args;
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
if (typeof options === "undefined") {
|
|
@@ -84,6 +87,11 @@ function Stdio() {
|
|
|
84
87
|
function cleanup(name) {
|
|
85
88
|
delete window[name];
|
|
86
89
|
}
|
|
90
|
+
|
|
91
|
+
child.on("exit", code => {
|
|
92
|
+
cleanup(childCallbackName);
|
|
93
|
+
});
|
|
94
|
+
|
|
87
95
|
try {
|
|
88
96
|
ksu.spawn(
|
|
89
97
|
command,
|