mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-12-12 20:36:29 +01:00
Sentry fix: Skip debug output from Mailsync
This commit is contained in:
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) {
|
||||
|
||||
Reference in New Issue
Block a user