Skip to content

Commit

Permalink
Merge pull request storybookjs#3563 from Keraito/unstructured-cli-output
Browse files Browse the repository at this point in the history
Ignore any unstructured output from the package managers
  • Loading branch information
Hypnosphi authored May 9, 2018
2 parents f1e2d47 + 4a1e7eb commit d8b7201
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/cli/lib/latest_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ export default function latestVersion(npmOptions, packageName) {
});

command.stderr.on('data', data => {
// yarn error
const info = JSON.parse(data);
if (info.type === 'error') {
reject(new Error(info.data));
try {
// yarn error
const info = JSON.parse(data);
if (info.type === 'error') {
reject(new Error(info.data));
}
} catch (e) {
// package manager unstructured info/warnings output
}
});
});
Expand Down

0 comments on commit d8b7201

Please sign in to comment.