add check for stderr
parent
fe0d1625a2
commit
71715969b1
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -30,9 +30,16 @@ export const supportedPackageManagers: SupportedPackageManagers = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getCommandOutput = async (toolCommand: string) => {
|
export const getCommandOutput = async (toolCommand: string) => {
|
||||||
const {stdout, stderr, exitCode} = await exec.getExecOutput(toolCommand);
|
let {stdout, stderr, exitCode} = await exec.getExecOutput(
|
||||||
|
toolCommand,
|
||||||
|
undefined,
|
||||||
|
{ignoreReturnCode: true}
|
||||||
|
);
|
||||||
|
|
||||||
if (exitCode && stderr) {
|
if (exitCode) {
|
||||||
|
stderr = !stderr
|
||||||
|
? `The '${toolCommand}' command failed with exit code: ${exitCode}`
|
||||||
|
: stderr;
|
||||||
throw new Error(stderr);
|
throw new Error(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue