mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-04 11:44:47 +08:00
Sentry fix: Skip debug output from Mailsync
This commit is contained in:
parent
0beb5c789b
commit
a729bbbbdf
2 changed files with 18 additions and 1 deletions
8
CLAUDE.md
Normal file
8
CLAUDE.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Claude Hooks
|
||||
|
||||
## after_edit
|
||||
Run linting after making code changes to ensure code quality and style consistency.
|
||||
|
||||
```bash
|
||||
npm run lint
|
||||
```
|
|
@ -305,7 +305,16 @@ export class MailsyncProcess extends EventEmitter {
|
|||
let error = null;
|
||||
let lastJSON = null;
|
||||
try {
|
||||
lastJSON = outBuffer.length && JSON.parse(outBuffer);
|
||||
if (outBuffer.length) {
|
||||
// Skip debug output that starts with 'dbg::' prefix
|
||||
if (outBuffer.startsWith('dbg::')) {
|
||||
console.log('Skipping debug output from mailsync:', outBuffer);
|
||||
} else {
|
||||
lastJSON = JSON.parse(outBuffer);
|
||||
}
|
||||
}
|
||||
} catch (parseError) {
|
||||
console.warn('Failed to parse mailsync output as JSON:', outBuffer);
|
||||
} finally {
|
||||
if (lastJSON) {
|
||||
if (lastJSON.error) {
|
||||
|
|
Loading…
Add table
Reference in a new issue