Skip to content

Commit

Permalink
fix(bundler): look in stdout and stderr for resolve matches
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Jan 15, 2020
1 parent 7b5485e commit 9d6ec38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/manager/bundler/artifacts.ts
Expand Up @@ -161,13 +161,14 @@ export async function updateArtifacts(
global.repoCache.bundlerArtifactsError = BUNDLER_INVALID_CREDENTIALS;
throw new Error(BUNDLER_INVALID_CREDENTIALS);
}
const output = err.stdout + err.stderr;
const resolveMatchRe = new RegExp('\\s+(.*) was resolved to', 'g');
if (err.stderr && err.stderr.match(resolveMatchRe)) {
if (output.match(resolveMatchRe)) {
logger.debug({ err }, 'Bundler has a resolve error');
const resolveMatches = [];
let resolveMatch;
do {
resolveMatch = resolveMatchRe.exec(err.stderr);
resolveMatch = resolveMatchRe.exec(output);
if (resolveMatch) {
resolveMatches.push(resolveMatch[1].split(' ').shift());
}
Expand Down

0 comments on commit 9d6ec38

Please sign in to comment.