Commit 395d8f51 authored by mercury233's avatar mercury233

fix undefined extract error

parent c4556039
Pipeline #15345 passed with stages
in 3 minutes and 53 seconds
...@@ -163,7 +163,7 @@ export class AppDetailComponent implements OnInit, OnChanges { ...@@ -163,7 +163,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
} }
} catch (e) { } catch (e) {
console.error(e); console.error(e);
new Notification(targetApp.name, {body: '下载失败' + e.message}); new Notification(targetApp.name, {body: '下载失败 ' + e.message});
} }
} }
...@@ -235,7 +235,7 @@ export class AppDetailComponent implements OnInit, OnChanges { ...@@ -235,7 +235,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
} }
catch (e) { catch (e) {
console.error(e); console.error(e);
new Notification(targetApp.name, {body: '导入时解压失败' + e.message}); new Notification(targetApp.name, {body: '导入时解压失败 ' + e.message});
} }
} }
// TODO: 执行依赖和references安装 // TODO: 执行依赖和references安装
...@@ -250,7 +250,7 @@ export class AppDetailComponent implements OnInit, OnChanges { ...@@ -250,7 +250,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
} }
} catch (e) { } catch (e) {
console.error(e); console.error(e);
new Notification(targetApp.name, {body: '导入失败' + e.message}); new Notification(targetApp.name, {body: '导入失败 ' + e.message});
} }
} }
...@@ -265,7 +265,7 @@ export class AppDetailComponent implements OnInit, OnChanges { ...@@ -265,7 +265,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
await this.appsService.update(mod, true); await this.appsService.update(mod, true);
} }
} catch (e) { } catch (e) {
new Notification(app.name, {body: '校验失败' + e.message}); new Notification(app.name, {body: '校验失败 ' + e.message});
console.error(e); console.error(e);
} }
} }
......
...@@ -1023,14 +1023,19 @@ export class AppsService { ...@@ -1023,14 +1023,19 @@ export class AppsService {
}); });
tarProcess.on('error', (e) => { tarProcess.on('error', (e) => {
console.log(e); console.log(e);
new Notification('MyCard', {body: '解压失败' + e.message}); console.log(tarProcess.spawnargs);
observer.error(e.message); new Notification('MyCard', { body: '解压失败 ' + e.message });
observer.error(e);
}); });
tarProcess.on('exit', (code) => { tarProcess.on('exit', (code) => {
if (code === 0) { if (code === 0) {
observer.complete(); observer.complete();
} else { } else {
observer.error(code); let e = new Error('tarProcess错误码:' + code);
console.log(e);
console.log(tarProcess.spawnargs);
new Notification('MyCard', { body: '解压失败 ' + e.message });
observer.error(e);
} }
}); });
return () => { return () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment