pinokiod 3.19.52 → 3.19.53
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/shell.js +20 -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,26 @@ class Shell {
|
|
|
261
262
|
if (this.params.shell) {
|
|
262
263
|
this.shell = this.params.shell
|
|
263
264
|
if (/bash/i.test(this.shell)) {
|
|
264
|
-
|
|
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
|
+
// split with ;
|
|
273
|
+
let chunks = val.split(";")
|
|
274
|
+
let transformed_chunks = []
|
|
275
|
+
for(let chunk of chunks) {
|
|
276
|
+
if (path.isAbsolute(chunk)) {
|
|
277
|
+
let transformed = normalize(chunk)
|
|
278
|
+
transformed_chunks.push(transformed)
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
this.env[key] = transformed_chunks.join(";")
|
|
282
|
+
}
|
|
283
|
+
console.log("after transform this.env", this.env)
|
|
284
|
+
}
|
|
267
285
|
}
|
|
268
286
|
}
|
|
269
287
|
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.
|
|
3
|
+
"version": "3.19.53",
|
|
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",
|