diff --git a/dist/index.js b/dist/index.js index f44618829..c98fd9bf7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13636,10 +13636,22 @@ class se_Helper { createMetaJson(root) { const execSync = external_child_process_.execSync; console.log('Run number: ' + this.currentBuild.runNumber); - const xmllint = execSync('sudo apt install libxml2-utils', { - shell: '/bin/bash' - }); - console.log(xmllint.toString()); + try { + const xmllint = execSync('sudo apt-get update; sudo apt install libxml2-utils', { + shell: '/bin/bash' + }); + console.log(xmllint.toString()); + } + catch (err) { + let message; + if (err instanceof Error) { + message = err.message; + } + else { + message = String(err); + } + console.log(message); + } const ret = []; const poms = this.listPoms(root); const ownersFile = Object(external_fs_.readFileSync)(root + '.github/CODEOWNERS', 'utf8') diff --git a/src/se.ts b/src/se.ts index 16d077988..4fb91dacb 100644 --- a/src/se.ts +++ b/src/se.ts @@ -46,10 +46,24 @@ export class Helper { public createMetaJson(root: string) { const execSync = child.execSync console.log('Run number: ' + this.currentBuild.runNumber) - const xmllint = execSync('sudo apt install libxml2-utils', { - shell: '/bin/bash' - }) - console.log(xmllint.toString()) + try { + const xmllint = execSync( + 'sudo apt-get update; sudo apt install libxml2-utils', + { + shell: '/bin/bash' + } + ) + + console.log(xmllint.toString()) + } catch (err) { + let message + if (err instanceof Error) { + message = err.message + } else { + message = String(err) + } + console.log(message) + } const ret: string[] = [] const poms = this.listPoms(root) const ownersFile = fs