-
Notifications
You must be signed in to change notification settings - Fork 479
app: frontend: runCmd: Fixes for plugin types user and static #4212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This static-plugins path for plugins was added recently, but this function did not consider it.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: illume The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This function was not updated to account for these two plugin type paths. Also the script exits with 1 when enountering a wrong path. Otherwise the script just hangs.
e4e4446 to
837aa4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for static-plugins plugin type in both the frontend and backend (electron app), enabling plugins bundled with the application to be properly identified and executed alongside the existing plugins and user-plugins.
Key Changes:
- Extended path normalization and package identification to handle static-plugins directories
- Added static-plugins directory to the list of allowed script execution paths in the electron app
- Improved error handling in runScript to exit with code 1 instead of silently returning
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/plugin/runPlugin.ts | Added static-plugins path normalization and package identification mappings for minikube plugins |
| frontend/src/plugin/runPlugin.test.ts | Added comprehensive test coverage for static-plugins paths including Windows path handling |
| app/electron/runCmd.ts | Extended runScript validation to allow scripts from user-plugins and static-plugins directories, improved error handling |
| app/electron/runCmd.test.ts | Added test suite for runScript function covering all three allowed plugin directories |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This fixes the runCommand to properly take into account user and static plugins.
Testing
There are some unit tests for this that are run on win/linux/Mac.
The minikube plugin was failing by hanging on the Add cluster view when installed as a user plugin.