Skip to content
Snippets Groups Projects
Commit 259312bb authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: catch Host key verification error for all lock file types

parent 4c3581ca
No related branches found
No related tags found
No related merge requests found
......@@ -480,6 +480,11 @@ async function getUpdatedLockFiles(config) {
}
}
}
// istanbul ignore if
if (res.stderr && res.stderr.includes('Host key verification failed')) {
logger.info({ stderr: res.stderr }, 'Host key verification failed');
throw new Error('internal-error');
}
lockFileErrors.push({
lockFile: lockFileName,
stderr: res.stderr,
......@@ -527,6 +532,11 @@ async function getUpdatedLockFiles(config) {
/* eslint-enable no-useless-escape */
}
}
// istanbul ignore if
if (res.stderr && res.stderr.includes('Host key verification failed')) {
logger.info({ stderr: res.stderr }, 'Host key verification failed');
throw new Error('internal-error');
}
lockFileErrors.push({
lockFile: lockFileName,
stderr: res.stderr,
......@@ -572,6 +582,11 @@ async function getUpdatedLockFiles(config) {
}
}
}
// istanbul ignore if
if (res.stdout && res.stdout.includes('Host key verification failed')) {
logger.info({ stdout: res.stdout }, 'Host key verification failed');
throw new Error('internal-error');
}
lockFileErrors.push({
lockFile: lockFileName,
stderr: res.stderr,
......@@ -614,6 +629,11 @@ async function getUpdatedLockFiles(config) {
) {
throw new Error('Out of disk space when generating yarn.lock');
}
// istanbul ignore if
if (res.stderr && res.stderr.includes('Host key verification failed')) {
logger.info({ stderr: res.stderr }, 'Host key verification failed');
throw new Error('internal-error');
}
lockFileErrors.push({
lockFile,
stderr: res.stderr,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment