diff --git a/lib/platform/git/storage.js b/lib/platform/git/storage.js index d8fd71d713099ed50563bfbc4e6465b159d02084..df13374f4bf9eb5578856f1d28afc1756d7c1c13 100644 --- a/lib/platform/git/storage.js +++ b/lib/platform/git/storage.js @@ -89,7 +89,12 @@ class Storage { await fs.emptyDir(cwd); git = Git(cwd).silent(true); const cloneStart = process.hrtime(); - await git.clone(config.url, '.', ['--depth=2', '--no-single-branch']); + try { + await git.clone(config.url, '.', ['--depth=2', '--no-single-branch']); + } catch (err) /* istanbul ignore next */ { + logger.debug({ err }, 'git clone error'); + throw new Error('platform-failure'); + } const cloneSeconds = Math.round( 1 + 10 * convertHrtime(process.hrtime(cloneStart)).seconds