fix: comprehensive security and quality improvements for PR #85 & #87 (#90)

Co-authored-by: tytsxai <tytsxai@users.noreply.github.com>
This commit is contained in:
ben
2025-12-21 17:55:16 +08:00
committed by cexll
parent 0f359b048f
commit 1f42bcc1c6
13 changed files with 517 additions and 80 deletions

View File

@@ -34,23 +34,25 @@ if ! curl -fsSL "$URL" -o /tmp/codeagent-wrapper; then
exit 1
fi
mkdir -p "$HOME/bin"
INSTALL_DIR="${INSTALL_DIR:-$HOME/.claude}"
BIN_DIR="${INSTALL_DIR}/bin"
mkdir -p "$BIN_DIR"
mv /tmp/codeagent-wrapper "$HOME/bin/codeagent-wrapper"
chmod +x "$HOME/bin/codeagent-wrapper"
mv /tmp/codeagent-wrapper "${BIN_DIR}/codeagent-wrapper"
chmod +x "${BIN_DIR}/codeagent-wrapper"
if "$HOME/bin/codeagent-wrapper" --version >/dev/null 2>&1; then
echo "codeagent-wrapper installed successfully to ~/bin/codeagent-wrapper"
if "${BIN_DIR}/codeagent-wrapper" --version >/dev/null 2>&1; then
echo "codeagent-wrapper installed successfully to ${BIN_DIR}/codeagent-wrapper"
else
echo "ERROR: installation verification failed" >&2
exit 1
fi
if [[ ":$PATH:" != *":$HOME/bin:"* ]]; then
if [[ ":$PATH:" != *":${BIN_DIR}:"* ]]; then
echo ""
echo "WARNING: ~/bin is not in your PATH"
echo "Add this line to your ~/.bashrc or ~/.zshrc:"
echo "WARNING: ${BIN_DIR} is not in your PATH"
echo "Add this line to your ~/.bashrc or ~/.zshrc (then restart your shell):"
echo ""
echo " export PATH=\"\$HOME/bin:\$PATH\""
echo " export PATH=\"${BIN_DIR}:\$PATH\""
echo ""
fi