Merge pull request #3753 from thelounge/xpaw/yarn-stdout
Wrap stdout parsing from yarn into try/catch
This commit is contained in:
commit
7fdb70d451
@ -132,11 +132,17 @@ class Utils {
|
|||||||
.trim()
|
.trim()
|
||||||
.split("\n")
|
.split("\n")
|
||||||
.forEach((line) => {
|
.forEach((line) => {
|
||||||
|
try {
|
||||||
line = JSON.parse(line);
|
line = JSON.parse(line);
|
||||||
|
|
||||||
if (line.type === "success") {
|
if (line.type === "success") {
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Stdout buffer has limitations and yarn may print
|
||||||
|
// big package trees, for example in the upgrade command
|
||||||
|
// See https://github.com/thelounge/thelounge/issues/3679
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user