File tree Expand file tree Collapse file tree 2 files changed +31
-8
lines changed Expand file tree Collapse file tree 2 files changed +31
-8
lines changed Original file line number Diff line number Diff line change @@ -13636,10 +13636,22 @@ class se_Helper {
13636
13636
createMetaJson(root) {
13637
13637
const execSync = external_child_process_.execSync;
13638
13638
console.log('Run number: ' + this.currentBuild.runNumber);
13639
- const xmllint = execSync('sudo apt install libxml2-utils', {
13640
- shell: '/bin/bash'
13641
- });
13642
- console.log(xmllint.toString());
13639
+ try {
13640
+ const xmllint = execSync('sudo apt install libxml2-utils', {
13641
+ shell: '/bin/bash'
13642
+ });
13643
+ console.log(xmllint.toString());
13644
+ }
13645
+ catch (err) {
13646
+ let message;
13647
+ if (err instanceof Error) {
13648
+ message = err.message;
13649
+ }
13650
+ else {
13651
+ message = String(err);
13652
+ }
13653
+ console.log(message);
13654
+ }
13643
13655
const ret = [];
13644
13656
const poms = this.listPoms(root);
13645
13657
const ownersFile = Object(external_fs_.readFileSync)(root + '.github/CODEOWNERS', 'utf8')
Original file line number Diff line number Diff line change @@ -46,10 +46,21 @@ export class Helper {
46
46
public createMetaJson ( root : string ) {
47
47
const execSync = child . execSync
48
48
console . log ( 'Run number: ' + this . currentBuild . runNumber )
49
- const xmllint = execSync ( 'sudo apt install libxml2-utils' , {
50
- shell : '/bin/bash'
51
- } )
52
- console . log ( xmllint . toString ( ) )
49
+ try {
50
+ const xmllint = execSync ( 'sudo apt install libxml2-utils' , {
51
+ shell : '/bin/bash'
52
+ } )
53
+
54
+ console . log ( xmllint . toString ( ) )
55
+ } catch ( err ) {
56
+ let message
57
+ if ( err instanceof Error ) {
58
+ message = err . message
59
+ } else {
60
+ message = String ( err )
61
+ }
62
+ console . log ( message )
63
+ }
53
64
const ret : string [ ] = [ ]
54
65
const poms = this . listPoms ( root )
55
66
const ownersFile = fs
You can’t perform that action at this time.
0 commit comments