pinokiod 3.5.15 → 3.5.16
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 +23 -18
- package/kernel/shell.js +4 -2
- package/package.json +1 -1
package/kernel/index.js
CHANGED
|
@@ -371,25 +371,30 @@ class Kernel {
|
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
async initHome() {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
374
|
+
if (this.homedir) {
|
|
375
|
+
let home_exists = await this.exists(this.homedir)
|
|
376
|
+
if (!home_exists) {
|
|
377
|
+
// first make dir
|
|
378
|
+
await fs.promises.mkdir(this.homedir, { recursive: true }).catch((e) => {})
|
|
379
|
+
// then wait until the app launches, and when it launches, grant access
|
|
380
|
+
if (this.platform === "win32") {
|
|
381
|
+
console.log("[initHome] Wait until the app launches")
|
|
382
|
+
let interval = setInterval(async () => {
|
|
383
|
+
console.log("[initHome] Has the app launched?", this.launch_complete)
|
|
384
|
+
if (this.launch_complete) {
|
|
385
|
+
console.log("[initHome] 1 Give full permission")
|
|
386
|
+
clearInterval(interval)
|
|
387
|
+
await this.bin.exec({
|
|
388
|
+
sudo: true,
|
|
389
|
+
message: `icacls ${this.homedir} /grant *S-1-1-0:(OI)(CI)F /T`
|
|
390
|
+
}, (stream) => {
|
|
391
|
+
process.stdout.write(stream.raw)
|
|
392
|
+
})
|
|
393
|
+
console.log("[initHome] 2 Give full permission done")
|
|
394
|
+
}
|
|
395
|
+
}, 1000)
|
|
391
396
|
}
|
|
392
|
-
}
|
|
397
|
+
}
|
|
393
398
|
}
|
|
394
399
|
}
|
|
395
400
|
async init(options) {
|
package/kernel/shell.js
CHANGED
|
@@ -817,9 +817,11 @@ class Shell {
|
|
|
817
817
|
} else {
|
|
818
818
|
// when python version is not specified, use the default python -m venv
|
|
819
819
|
venv_activation = [
|
|
820
|
-
|
|
820
|
+
//`python -m venv ${env_path}`,
|
|
821
|
+
`uv venv ${env_path}${python_version}`,
|
|
821
822
|
(this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
|
|
822
|
-
|
|
823
|
+
//`python -m pip install --upgrade pip setuptools wheel`,
|
|
824
|
+
`uv pip install --upgrade pip setuptools wheel`,
|
|
823
825
|
deactivate_path,
|
|
824
826
|
timeout,
|
|
825
827
|
(this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
|