pinokiod 5.3.0 → 5.3.1

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.
@@ -14,20 +14,12 @@ class Registry {
14
14
  }, (stream) => {
15
15
  })
16
16
  console.log("registry check", { res })
17
- //let matches = /(LongPathsEnabled.+)[\r\n]+/.exec(res.response)
18
- let matches = /(LongPathsEnabled.+REG_DWORD.+)[\r\n]+/.exec(res.response)
17
+ const output = (res && (res.response || res.stdout)) || ""
18
+ const matches = /LongPathsEnabled\s+REG_DWORD\s+([^\s]+)/i.exec(output)
19
19
  console.log("matches", matches)
20
- if (matches && matches.length > 0) {
21
- let chunks = matches[1].split(/\s+/)
22
- if (chunks.length === 3) {
23
- if (Number(chunks[2]) === 1) {
24
- this._installed = true
25
- } else {
26
- this._installed = false
27
- }
28
- } else {
29
- this._installed = false
30
- }
20
+ if (matches && matches[1]) {
21
+ const parsed = parseInt(matches[1], 0)
22
+ this._installed = Number.isFinite(parsed) && parsed === 1
31
23
  } else {
32
24
  this._installed = false
33
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {