pinokiod 3.2.225 → 3.2.227
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/index.js +16 -10
- package/package.json +1 -1
package/kernel/index.js
CHANGED
|
@@ -497,17 +497,23 @@ class Kernel {
|
|
|
497
497
|
console.log(e)
|
|
498
498
|
if (e.PINOKIO_SCRIPT_AUTOLAUNCH) {
|
|
499
499
|
let autolaunch_path = path.resolve(env_path, e.PINOKIO_SCRIPT_AUTOLAUNCH)
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
500
|
+
let exists = await this.exists(autolaunch_path)
|
|
501
|
+
console.log("ATTEMPTING AUTOLAUNCH", autolaunch_path)
|
|
502
|
+
if (exists) {
|
|
503
|
+
console.log("SCRIPT EXISTS. Starting...", autolaunch_path)
|
|
504
|
+
let res = await new Promise((resolve, reject) => {
|
|
505
|
+
this.api.process({
|
|
506
|
+
uri: autolaunch_path,
|
|
507
|
+
input: {}
|
|
508
|
+
// client: req.client,
|
|
509
|
+
// caller: req.parent.path,
|
|
510
|
+
}, (r) => {
|
|
511
|
+
resolve(r.input)
|
|
512
|
+
})
|
|
509
513
|
})
|
|
510
|
-
}
|
|
514
|
+
} else {
|
|
515
|
+
console.log("SCRIPT DOES NOT EXIST. Ignoring.", autolaunch_path)
|
|
516
|
+
}
|
|
511
517
|
}
|
|
512
518
|
}
|
|
513
519
|
}
|