pinokiod 3.2.189 → 3.2.191

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 CHANGED
@@ -353,22 +353,24 @@ class Kernel {
353
353
  console.log("bin init finished")
354
354
  if (this.homedir) {
355
355
  this.shell.init().then(async () => {
356
- console.log(">>>>>> this.envs", this.envs)
357
356
  if (this.envs) {
358
357
  this.template.update({
359
358
  env: this.envs,
360
359
  envs: this.envs
361
360
  })
362
361
  }
363
- if (this.platform === "win32") {
364
- console.log("2 Give full permission")
365
- await this.bin.exec({
366
- sudo: true,
367
- message: `icacls ${this.homedir} /grant Users:(OI)(CI)F /T`
368
- }, (stream) => {
369
- ondata(stream)
370
- })
371
- console.log("2 Give full permission done")
362
+ console.log({ grant_permission })
363
+ if (grant_permission) {
364
+ if (this.platform === "win32") {
365
+ console.log("2 Give full permission")
366
+ await this.bin.exec({
367
+ sudo: true,
368
+ message: `icacls ${this.homedir} /grant Users:(OI)(CI)F /T`
369
+ }, (stream) => {
370
+ ondata(stream)
371
+ })
372
+ console.log("2 Give full permission done")
373
+ }
372
374
  }
373
375
  })
374
376
  }
package/kernel/shells.js CHANGED
@@ -127,21 +127,23 @@ class Shells {
127
127
  matches[2] += "g" // if g option is not included, include it (need it for matchAll)
128
128
  }
129
129
  let re = new RegExp(matches[1], matches[2])
130
- let line = stream.cleaned.replaceAll(/[\r\n]/g, "")
131
- //let rendered_event = [...stream.cleaned.matchAll(re)]
130
+ if (stream.cleaned) {
131
+ let line = stream.cleaned.replaceAll(/[\r\n]/g, "")
132
+ //let rendered_event = [...stream.cleaned.matchAll(re)]
132
133
 
133
134
 
134
- let rendered_event = [...line.matchAll(re)]
135
- // 3. if the rendered expression is truthy, run the "run" script
136
- if (rendered_event.length > 0) {
137
- stream.matches = rendered_event
138
- if (handler.kill) {
139
- m = rendered_event[0]
140
- sh.kill()
141
- }
142
- if (handler.done) {
143
- m = rendered_event[0]
144
- sh.continue()
135
+ let rendered_event = [...line.matchAll(re)]
136
+ // 3. if the rendered expression is truthy, run the "run" script
137
+ if (rendered_event.length > 0) {
138
+ stream.matches = rendered_event
139
+ if (handler.kill) {
140
+ m = rendered_event[0]
141
+ sh.kill()
142
+ }
143
+ if (handler.done) {
144
+ m = rendered_event[0]
145
+ sh.continue()
146
+ }
145
147
  }
146
148
  }
147
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.189",
3
+ "version": "3.2.191",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {