@nordicsemiconductor/nrf-jlink-js 0.14.0 → 0.14.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.
@@ -124,7 +124,10 @@ var winRegQuery = function (key) {
124
124
  if (process.platform !== 'win32') {
125
125
  throw new Error('Unsupported platform');
126
126
  }
127
- return (0, child_process_1.execSync)("".concat(reg(), " query ").concat(key)).toString().trim();
127
+ try {
128
+ return (0, child_process_1.execSync)("".concat(reg(), " query ").concat(key)).toString().trim();
129
+ }
130
+ catch (_a) { }
128
131
  };
129
132
  var getJLinkExePath = function () {
130
133
  var _a;
@@ -134,7 +137,9 @@ var getJLinkExePath = function () {
134
137
  if (!cwd) {
135
138
  cwd = winRegQuery('HKEY_LOCAL_MACHINE\\Software\\SEGGER\\J-Link /v InstallPath');
136
139
  }
137
- cwd = ((_a = /InstallPath\s+\w+\s+(.*)/.exec(cwd)) !== null && _a !== void 0 ? _a : [])[1];
140
+ cwd = cwd
141
+ ? ((_a = /InstallPath\s+\w+\s+(.*)/.exec(cwd)) !== null && _a !== void 0 ? _a : [])[1]
142
+ : undefined;
138
143
  if (!cwd) {
139
144
  throw new Error('JLink not installed');
140
145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/nrf-jlink-js",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "main": "dist",
5
5
  "types": "dist",
6
6
  "files": [