Skip to content

fix(scripts): add uninstall handlers and sudo-aware removal#38

Merged
CybotTM merged 4 commits into
mainfrom
fix/uninstall-handlers
Feb 25, 2026
Merged

fix(scripts): add uninstall handlers and sudo-aware removal#38
CybotTM merged 4 commits into
mainfrom
fix/uninstall-handlers

Conversation

@CybotTM
Copy link
Copy Markdown
Member

@CybotTM CybotTM commented Feb 25, 2026

Summary

  • Add missing uninstall action handlers to install_go.sh, install_composer.sh, install_docker.sh, and install_parallel.sh — all 14 dedicated scripts now consistently handle install/update/uninstall
  • Fix remove_installation() in reconcile.sh to check directory writability before removal, using sudo for root-owned paths like /usr/local/bin

Closes #36, closes #37

Test plan

  • 36 new tests added (32 parametrized + 4 behavioral)
  • TestDedicatedScriptUninstallHandler: verifies all 14 dedicated scripts parse $1 and have uninstall) case
  • TestReconcileSudoAwareRemoval: verifies writability check in reconcile.sh, behavioral tests with writable/non-writable dirs
  • All 528 tests pass

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Comment thread tests/test_update_fixes.py Fixed
Comment thread tests/test_update_fixes.py Fixed
Add missing uninstall action to install_go.sh, install_composer.sh,
install_docker.sh, and install_parallel.sh. All 14 dedicated scripts
now consistently handle install/update/uninstall actions.

Fix remove_installation() in reconcile.sh to check directory writability
before removal, using sudo for root-owned paths like /usr/local/bin.

Closes #36, closes #37

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
- Add sudo availability check in reconcile.sh remove_installation
- Narrow sed patterns in install_go.sh to only match export lines
- Add sudo check before rm -rf in install_go.sh uninstall
- Add test for graceful error when sudo is unavailable

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Change test file permissions from 0o755 (world-executable) to 0o700
(owner-only) in all tests added by this PR. The bash subprocess runs
as the same user, so group/other permissions are unnecessary. This
resolves a CodeQL "overly permissive file permissions" false positive.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@CybotTM CybotTM force-pushed the fix/uninstall-handlers branch from acd2751 to b24bc6b Compare February 25, 2026 14:49
@CybotTM CybotTM merged commit 3681b32 into main Feb 25, 2026
11 checks passed
@CybotTM CybotTM deleted the fix/uninstall-handlers branch March 16, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants