pinokiod 2.1.12 → 2.1.13
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/bin/index.js +5 -0
- package/kernel/bin/registry.js +11 -1
- package/package.json +1 -1
package/kernel/bin/index.js
CHANGED
|
@@ -340,6 +340,11 @@ class Bin {
|
|
|
340
340
|
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
+
if (this.platform === "win32") {
|
|
344
|
+
this.registry_installed = await this.kernel.bin.mod.registry.installed()
|
|
345
|
+
console.log("initial registry_installed", this.registry_installed)
|
|
346
|
+
}
|
|
347
|
+
|
|
343
348
|
// /// B. base path initialization
|
|
344
349
|
// let conda_meta_path = this.kernel.bin.path("miniconda", "conda-meta")
|
|
345
350
|
// const metaFiles = await glob("*.json", {
|
package/kernel/bin/registry.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
class Registry {
|
|
2
2
|
description = "Look for a dialog requesting admin permission and approve it to proceed. This will allow long paths on your machine, which is required for installing certain python packages."
|
|
3
|
-
async installed() {
|
|
3
|
+
async installed(force) {
|
|
4
|
+
if (!force && '_installed' in this) {
|
|
5
|
+
console.log("this._installed already determined", this._installed)
|
|
6
|
+
return this._installed
|
|
7
|
+
}
|
|
8
|
+
|
|
4
9
|
let res = await this.kernel.bin.exec({
|
|
5
10
|
message: "reg query HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem /v LongPathsEnabled",
|
|
6
11
|
}, (stream) => {
|
|
@@ -14,14 +19,18 @@ class Registry {
|
|
|
14
19
|
console.log("chunks", chunks)
|
|
15
20
|
if (chunks.length === 3) {
|
|
16
21
|
if (Number(chunks[2]) === 1) {
|
|
22
|
+
this._installed = true
|
|
17
23
|
return true
|
|
18
24
|
} else {
|
|
25
|
+
this._installed = false
|
|
19
26
|
return false
|
|
20
27
|
}
|
|
21
28
|
} else {
|
|
29
|
+
this._installed = false
|
|
22
30
|
return false
|
|
23
31
|
}
|
|
24
32
|
} else {
|
|
33
|
+
this._installed = false
|
|
25
34
|
return false
|
|
26
35
|
}
|
|
27
36
|
}
|
|
@@ -33,6 +42,7 @@ class Registry {
|
|
|
33
42
|
}, (stream) => {
|
|
34
43
|
ondata(stream)
|
|
35
44
|
})
|
|
45
|
+
await this.installed(true) // force refresh
|
|
36
46
|
return res
|
|
37
47
|
}
|
|
38
48
|
}
|