Skip to content

feat: add uninstall script#1404

Open
selfagency wants to merge 2 commits into
git-ai-project:mainfrom
selfagency:uninstaller
Open

feat: add uninstall script#1404
selfagency wants to merge 2 commits into
git-ai-project:mainfrom
selfagency:uninstaller

Conversation

@selfagency
Copy link
Copy Markdown

@selfagency selfagency commented May 20, 2026

This PR adds an uninstall.sh script that allows users to easily uninstall git-ai whether they need to for debugging reasons or they simply no longer wish to use the product.


Open in Devin Review

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 20, 2026

CLA assistant check
All committers have signed the CLA.

devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

View 6 additional findings in Devin Review.

Open in Devin Review

Comment thread uninstall.sh
fi

if grep -q '[^[:space:]]' "$tmp"; then
mv "$tmp" "$rc_file"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 mv from mktemp file silently changes shell config file permissions to 0600

cleanup_shell_config creates a temp file via mktemp (which uses mode 0600), runs awk to filter the contents, then does mv "$tmp" "$rc_file" on line 91. The mv replaces the original file's inode with the temp file's, so the shell config (e.g. ~/.bashrc, ~/.zshrc) inherits the 0600 permissions of the temp file instead of keeping its original permissions (typically 0644). This silently restricts the file's permissions. The fix is to write back to the original file preserving its inode and permissions, e.g. cat "$tmp" > "$rc_file" && rm -f "$tmp", or to capture and restore the original permissions before moving.

Suggested change
mv "$tmp" "$rc_file"
cat "$tmp" > "$rc_file" && rm -f "$tmp"
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread uninstall.sh
@@ -0,0 +1,179 @@
#!/usr/bin/env bash
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 uninstall.sh committed without executable permission, inconsistent with install.sh

The file is committed with mode 100644 (not executable), while install.sh is 100755. Since uninstall.sh has a #!/usr/bin/env bash shebang and is intended to be run directly (similar to install.sh), it should be executable. Users who download and try to run ./uninstall.sh will get a "Permission denied" error.

Prompt for agents
The file uninstall.sh is committed with mode 100644 (not executable), but install.sh uses 100755. Run `git update-index --chmod=+x uninstall.sh` or `chmod +x uninstall.sh && git add uninstall.sh` to set the executable bit in git, matching the convention used by install.sh.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

2 participants