File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ And then call "npm run build".
39
39
### __WORK IN PROGRESS__
40
40
-->
41
41
## Changelog
42
+ ### __ WORK IN PROGRESS__
43
+ * (Apollon77) Catch error case when npm istallation fails (Sentry IOBROKER-JAVASCRIPT-3K)
44
+ * (Apollon77) Prevent crash case in mirroring (Sentry IOBROKER-JAVASCRIPT-3M)
45
+
42
46
### 4.6.25 (2020-08-24)
43
47
* (bluefox) Fixed the loading of page
44
48
Original file line number Diff line number Diff line change @@ -222,6 +222,10 @@ class Mirror {
222
222
if ( objects [ o ] === files [ f ] ) {
223
223
const id = dirDB + '.' + objects [ o ] ;
224
224
225
+ if ( ! this . diskList [ id ] ) {
226
+ continue ;
227
+ }
228
+
225
229
if ( ! this . dbList [ id ] . ts || ( this . dbList [ id ] . ts > this . diskList [ id ] . ts && this . dbList [ id ] . ts - this . diskList [ id ] . ts > 2000 ) ) {
226
230
// copy text to file
227
231
this . dbList [ id ] . ts = Date . now ( ) ;
Original file line number Diff line number Diff line change @@ -1214,12 +1214,19 @@ function installNpm(npmLib, callback) {
1214
1214
child . stderr . on ( 'data' , buf =>
1215
1215
adapter . log . error ( buf . toString ( 'utf8' ) ) ) ;
1216
1216
1217
+ child . on ( 'err' , err => {
1218
+ adapter . log . error ( 'Cannot install ' + npmLib + ': ' + err ) ;
1219
+ if ( typeof callback === 'function' ) callback ( npmLib ) ;
1220
+ callback = null ;
1221
+ } ) ;
1222
+
1217
1223
child . on ( 'exit' , ( code /* , signal */ ) => {
1218
1224
if ( code ) {
1219
1225
adapter . log . error ( 'Cannot install ' + npmLib + ': ' + code ) ;
1220
1226
}
1221
1227
// command succeeded
1222
1228
if ( typeof callback === 'function' ) callback ( npmLib ) ;
1229
+ callback = null ;
1223
1230
} ) ;
1224
1231
}
1225
1232
Original file line number Diff line number Diff line change 30
30
},
31
31
"dependencies" : {
32
32
"@iobroker/adapter-core" : " ^2.4.0" ,
33
- "@types/node" : " ^10.17.28 " ,
33
+ "@types/node" : " ^12.12.54 " ,
34
34
"@types/request" : " ^2.48.5" ,
35
35
"coffee-compiler" : " ^0.3.2" ,
36
36
"coffee-script" : " ^1.12.7" ,
You can’t perform that action at this time.
0 commit comments