@@ -299,11 +299,16 @@ class DevServer {
299299 . join ( '\n' ) } \n\nto use dev-server.`) ;
300300 }
301301 async update ( ) {
302+ var _a ;
302303 await this . checkSetup ( ) ;
303304 this . log . notice ( 'Updating everything...' ) ;
305+ if ( ! ( ( _a = this . config ) === null || _a === void 0 ? void 0 : _a . useSymlinks ) ) {
306+ this . log . notice ( 'Building local adapter.' ) ;
307+ await this . buildLocalAdapter ( ) ;
308+ await this . installLocalAdapter ( false ) ; //do not install, keep .tgz file.
309+ }
304310 this . execSync ( 'npm update --loglevel error' , this . profileDir ) ;
305311 this . uploadAdapter ( 'admin' ) ;
306- await this . buildLocalAdapter ( ) ;
307312 await this . installLocalAdapter ( ) ;
308313 if ( ! this . isJSController ( ) )
309314 this . uploadAdapter ( this . adapterName ) ;
@@ -1288,7 +1293,7 @@ class DevServer {
12881293 this . execSync ( 'npm run build' , this . rootDir ) ;
12891294 }
12901295 }
1291- async installLocalAdapter ( ) {
1296+ async installLocalAdapter ( doInstall = true ) {
12921297 var _a , _b ;
12931298 this . log . notice ( `Install local iobroker.${ this . adapterName } ` ) ;
12941299 if ( ( _a = this . config ) === null || _a === void 0 ? void 0 : _a . useSymlinks ) {
@@ -1306,9 +1311,11 @@ class DevServer {
13061311 const { stdout } = await this . getExecOutput ( 'npm pack' , this . rootDir ) ;
13071312 const filename = stdout . trim ( ) ;
13081313 this . log . info ( `Packed to ${ filename } ` ) ;
1309- const fullPath = path . join ( this . rootDir , filename ) ;
1310- this . execSync ( `npm install "${ fullPath } "` , this . profileDir ) ;
1311- await this . rimraf ( fullPath ) ;
1314+ if ( doInstall ) {
1315+ const fullPath = path . join ( this . rootDir , filename ) ;
1316+ this . execSync ( `npm install "${ fullPath } "` , this . profileDir ) ;
1317+ await this . rimraf ( fullPath ) ;
1318+ }
13121319 }
13131320 }
13141321 async installRepoAdapter ( adapterName ) {
0 commit comments