pinokiod 2.1.12 → 2.1.14

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.
@@ -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", {
@@ -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,16 +19,17 @@ class Registry {
14
19
  console.log("chunks", chunks)
15
20
  if (chunks.length === 3) {
16
21
  if (Number(chunks[2]) === 1) {
17
- return true
22
+ this._installed = true
18
23
  } else {
19
- return false
24
+ this._installed = false
20
25
  }
21
26
  } else {
22
- return false
27
+ this._installed = false
23
28
  }
24
29
  } else {
25
- return false
30
+ this._installed = false
26
31
  }
32
+ return this._installed
27
33
  }
28
34
  async install(req, ondata) {
29
35
  // 1. Set registry to allow long paths
@@ -33,6 +39,7 @@ class Registry {
33
39
  }, (stream) => {
34
40
  ondata(stream)
35
41
  })
42
+ await this.installed(true) // force refresh
36
43
  return res
37
44
  }
38
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "2.1.12",
3
+ "version": "2.1.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {