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

This commit is contained in:
Rhys Arkins 2018-03-26 13:19:06 +02:00
parent 4c3581caf0
commit 259312bb97

View file

@ -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,