Describe errors in System.run

This commit is contained in:
Webber 2020-05-21 20:51:17 +02:00 committed by Webber Takken
parent 0159028bb1
commit 3718e05961
2 changed files with 3 additions and 3 deletions

View File

@ -48,11 +48,11 @@ class System {
const exitCode = await exec(command, arguments_, { silent: true, listeners, ...options });
showOutput();
if (exitCode !== 0) {
throwErrorShowing(error);
throwErrorShowing(`Command returned non-zero exit code.\nError: ${error}`);
}
} catch (inCommandError) {
showOutput();
throwErrorShowing(inCommandError);
throwErrorShowing(`In-command error caught: ${inCommandError}`);
}
return result;

View File

@ -148,7 +148,7 @@ export default class Versioning {
try {
await this.git(['fetch', '--unshallow']);
} catch (error) {
core.warning(error);
core.warning(`Fetch --unshallow caught: ${error}`);
await this.git(['fetch']);
}
}