mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 04:23:13 +00:00
Merge pull request #3753 from thelounge/xpaw/yarn-stdout
Wrap stdout parsing from yarn into try/catch
This commit is contained in:
commit
7fdb70d451
1 changed files with 9 additions and 3 deletions
|
@ -132,10 +132,16 @@ class Utils {
|
|||
.trim()
|
||||
.split("\n")
|
||||
.forEach((line) => {
|
||||
line = JSON.parse(line);
|
||||
try {
|
||||
line = JSON.parse(line);
|
||||
|
||||
if (line.type === "success") {
|
||||
success = true;
|
||||
if (line.type === "success") {
|
||||
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 a new issue