pinokiod 3.19.52 → 3.19.54

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/shell.js +22 -2
  2. package/package.json +2 -1
package/kernel/shell.js CHANGED
@@ -4,6 +4,7 @@ const sanitize = require("sanitize-filename");
4
4
  const YAML = require('yaml')
5
5
  const kill = require('kill-sync')
6
6
  const fastq = require('fastq')
7
+ const normalize = require('normalize-path');
7
8
  const { v4: uuidv4 } = require('uuid');
8
9
  const os = require('os');
9
10
  const fs = require('fs');
@@ -261,9 +262,28 @@ class Shell {
261
262
  if (this.params.shell) {
262
263
  this.shell = this.params.shell
263
264
  if (/bash/i.test(this.shell)) {
264
- //this.args = ["--noprofile", "--norc", "-i"]
265
- this.args = [ "--login", "-i"]
265
+ this.args = ["--noprofile", "--norc"]
266
+ //this.args = [ "--login", "-i"]
266
267
  this.EOL = "\n"
268
+ if (this.platform === "win32") {
269
+ console.log("before transform this.env", this.env)
270
+ for(let key in this.env) {
271
+ let val = this.env[key]
272
+ if (val && typeof val === "string") {
273
+ // split with ;
274
+ let chunks = val.split(";")
275
+ let transformed_chunks = []
276
+ for(let chunk of chunks) {
277
+ if (path.isAbsolute(chunk)) {
278
+ let transformed = normalize(chunk)
279
+ transformed_chunks.push(transformed)
280
+ }
281
+ }
282
+ this.env[key] = transformed_chunks.join(";")
283
+ }
284
+ }
285
+ console.log("after transform this.env", this.env)
286
+ }
267
287
  }
268
288
  }
269
289
  console.log({ shell: this.shell, args: this.args, eol: this.EOL })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.19.52",
3
+ "version": "3.19.54",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -54,6 +54,7 @@
54
54
  "node-downloader-helper": "^2.1.9",
55
55
  "node-gradio-client": "^0.14.6",
56
56
  "node-notifier": "^10.0.1",
57
+ "normalize-path": "^3.0.0",
57
58
  "p-limit": "^3.1.0",
58
59
  "pdrive": "^0.0.27",
59
60
  "portfinder-cp": "^1.0.34",