Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bin/plugins/checkPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,12 @@ log4js.configure({
logger.warn('Test files not found, please create tests. https://github.com/ether/etherpad-lite/wiki/Creating-a-plugin#writing-and-running-front-end-tests-for-your-plugin');
}

// Update all dependencies to their latest compatible versions.
if (autoFix) {
logger.info('Updating dependencies...');
execSync('pnpm update', {cwd: `${pluginPath}/`, stdio: 'inherit'});
}
Comment on lines +406 to +410

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Update failure aborts autofix 🐞 Bug ☼ Reliability

In autofix mode, checkPlugin.ts runs pnpm update via execSync() without a try/catch, so any
non-zero exit (registry/network/resolution failure) terminates the script before
install/lint/diff/commit steps can run.
Agent Prompt
### Issue description
`pnpm update` is executed with `execSync()` in autofix mode without error handling; if it fails, the script exits early and skips later autofix steps (install, lint, showing diff, and optional commit/push).

### Issue Context
There is already precedent in this script for tolerating failures and continuing (the lint section wraps `execSync()` in a try/catch).

### Fix Focus Areas
- bin/plugins/checkPlugin.ts[406-410]
- bin/plugins/checkPlugin.ts[425-432]

### Suggested change
Wrap the `pnpm update` `execSync()` call in a try/catch. On failure, log a warning/error and continue to the existing `pnpm install` + linting flow (or explicitly rethrow with a clearer message if you intend update failures to be fatal).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


// Install dependencies so we can run ESLint. This should also create or update package-lock.json
// if autoFix is enabled.
const npmInstall = `pnpm install`;
Expand Down
Loading