mirror of
https://github.com/actions/github-script.git
synced 2026-02-08 03:57:27 +00:00
Added error handling
This commit is contained in:
parent
2a9db83c42
commit
085e38d2d3
2 changed files with 31 additions and 8 deletions
20
dist/index.js
vendored
20
dist/index.js
vendored
|
|
@ -13636,10 +13636,22 @@ class se_Helper {
|
||||||
createMetaJson(root) {
|
createMetaJson(root) {
|
||||||
const execSync = external_child_process_.execSync;
|
const execSync = external_child_process_.execSync;
|
||||||
console.log('Run number: ' + this.currentBuild.runNumber);
|
console.log('Run number: ' + this.currentBuild.runNumber);
|
||||||
const xmllint = execSync('sudo apt install libxml2-utils', {
|
try {
|
||||||
shell: '/bin/bash'
|
const xmllint = execSync('sudo apt install libxml2-utils', {
|
||||||
});
|
shell: '/bin/bash'
|
||||||
console.log(xmllint.toString());
|
});
|
||||||
|
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 ret = [];
|
||||||
const poms = this.listPoms(root);
|
const poms = this.listPoms(root);
|
||||||
const ownersFile = Object(external_fs_.readFileSync)(root + '.github/CODEOWNERS', 'utf8')
|
const ownersFile = Object(external_fs_.readFileSync)(root + '.github/CODEOWNERS', 'utf8')
|
||||||
|
|
|
||||||
19
src/se.ts
19
src/se.ts
|
|
@ -46,10 +46,21 @@ export class Helper {
|
||||||
public createMetaJson(root: string) {
|
public createMetaJson(root: string) {
|
||||||
const execSync = child.execSync
|
const execSync = child.execSync
|
||||||
console.log('Run number: ' + this.currentBuild.runNumber)
|
console.log('Run number: ' + this.currentBuild.runNumber)
|
||||||
const xmllint = execSync('sudo apt install libxml2-utils', {
|
try {
|
||||||
shell: '/bin/bash'
|
const xmllint = execSync('sudo apt install libxml2-utils', {
|
||||||
})
|
shell: '/bin/bash'
|
||||||
console.log(xmllint.toString())
|
})
|
||||||
|
|
||||||
|
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 ret: string[] = []
|
||||||
const poms = this.listPoms(root)
|
const poms = this.listPoms(root)
|
||||||
const ownersFile = fs
|
const ownersFile = fs
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue