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.
Files changed (2) hide show
  1. package/kernel/index.js +16 -10
  2. 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
- console.log("AUTOLAUNCHING", autolaunch_path)
501
- let res = await new Promise((resolve, reject) => {
502
- this.api.process({
503
- uri: autolaunch_path,
504
- input: {}
505
- // client: req.client,
506
- // caller: req.parent.path,
507
- }, (r) => {
508
- resolve(r.input)
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.225",
3
+ "version": "3.2.227",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {