Skip to content

Please support running a pre_uninstall script #2277

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

Closed
3 tasks done
PaulStoffregen opened this issue Aug 24, 2023 · 1 comment · Fixed by #2311
Closed
3 tasks done

Please support running a pre_uninstall script #2277

PaulStoffregen opened this issue Aug 24, 2023 · 1 comment · Fixed by #2311
Assignees
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@PaulStoffregen
Copy link

Describe the request

Please add the ability for platforms to provide a pre_uninstall script.

Similar to the post_install script feature which is run after Boards Manager finishes installing a platform, which allows installing drivers or other system setup, a pre_uninstall script would be run before uninstalling to allow for removal of drivers, stopping any background programs, closing any network connections (even if only localhost between programs) and any other special cleanup which should be performed before the platform files are removed.

Describe the current behavior

While any platform could benefit, pre_uninstall is particularly needed by the Teensy platform on Windows. A background process is started during upload and left running to allow subsequent uploads to run quickly. If this process is still running during uninstall, Windows may not allow the platform files to be deleted. The uninstall silently fails, and subsequent install can then also fail.

Arduino CLI version

Version: 0.34.0 Commit: 304d48c Date: 2023-08-22T15:54:20Z

Operating system

N/A

Operating system version

any

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details
@PaulStoffregen
Copy link
Author

Quick followup - just want to say thanks for adding this capability! We're just now starting to use it in Teensy's package. It's working well with the nightly IDE builds. Really looking forward to the next IDE release, so soon our long standing problems with needing uninstall cleanup can become a distant memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants