Skip to content

Fix uninstall failing when Wave Terminal config not found#18

Merged
Qbandev merged 2 commits into
mainfrom
copilot/fix-uninstall-commands
Feb 18, 2026
Merged

Fix uninstall failing when Wave Terminal config not found#18
Qbandev merged 2 commits into
mainfrom
copilot/fix-uninstall-commands

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 17, 2026

The run_uninstall() function in install.sh attempts to use $WAVETERM_CONFIG/widgets.json without checking if WAVETERM_CONFIG is empty, causing failures when Wave Terminal is not installed or its config directory is missing. The standalone uninstall.sh already handles this correctly.

Changes

  • Added validation check in run_uninstall() to match uninstall.sh behavior:
    • Warns when Wave Terminal config not found
    • Skips widget removal gracefully
    • Continues with remaining uninstall steps
- # Remove widgets from widgets.json
- if [[ -f "$widgets_file" ]]; then
+ # Check if Wave Terminal is installed
+ if [[ -z "$WAVETERM_CONFIG" ]]; then
+     print_warning "Wave Terminal config not found, skipping widget removal."
+ elif [[ -f "$widgets_file" ]]; then
+     # Remove widgets from widgets.json

This synchronizes both uninstall code paths (wave-notes-setup --uninstall and wave-notes-uninstall).

Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug]</issue_title>
<issue_description>## Describe the Bug

The uninstall commands are not working

Steps to Reproduce

wave-notes-setup --uninstall

or

wave-notes-uninstall

Environment

  • macOS version: 26.2 Tahoe
  • Wave Terminal version: v14.0.0
  • wave-notes-setup version: v2.0.2
  • Shell: zsh

</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@github-actions
Copy link
Copy Markdown
Contributor

Review Checklist

Please ensure the following before merging:

Code Quality

  • shellcheck install.sh uninstall.sh passes
  • bats test/*.bats - all tests pass
  • No hardcoded user paths (use $HOME, $NOTES_DIR, etc.)

Testing

  • Tested fresh install on clean Wave Terminal config
  • Tested install with existing widgets.json
  • Tested uninstall preserves other widgets
  • Verified generated files have no hardcoded paths

Documentation

  • README updated if needed
  • .agents.md updated if functions changed

GitHub Copilot has been requested to review this PR.

Co-authored-by: Qbandev <8140029+Qbandev@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix uninstall commands not working Fix uninstall failing when Wave Terminal config not found Feb 17, 2026
Copilot AI requested a review from Qbandev February 17, 2026 16:55
@Qbandev Qbandev requested a review from Copilot February 17, 2026 16:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes uninstall failures when Wave Terminal isn’t installed (or its config dir can’t be detected) by making install.sh’s run_uninstall() skip widget removal gracefully—matching the standalone uninstall.sh behavior.

Changes:

  • Add a guard in run_uninstall() to detect missing WAVETERM_CONFIG.
  • Emit a warning and continue uninstall steps instead of attempting to access widgets.json with an empty config path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Qbandev Qbandev marked this pull request as ready for review February 18, 2026 10:55
@Qbandev Qbandev merged commit a8f42f3 into main Feb 18, 2026
13 checks passed
@Qbandev Qbandev deleted the copilot/fix-uninstall-commands branch February 18, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]

3 participants