Skip to content

Commit e1cd25a

Browse files
sssemilclaude
andcommitted
Add reinstall prompt if already installed
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 33ef001 commit e1cd25a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

install.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ mkdir -p "$BIN_DIR"
1717

1818
export PATH="$BIN_DIR:$PATH"
1919

20+
# check if already installed
21+
if [ -x "$BIN_DIR/safe-claude" ]; then
22+
echo "safe-claude is already installed."
23+
printf "Reinstall? [y/N] "
24+
read -r answer
25+
case "$answer" in
26+
[Yy]*) ;;
27+
*) echo "Aborted."; exit 0 ;;
28+
esac
29+
fi
30+
2031
# install claude code if missing
2132
if ! command -v claude >/dev/null 2>&1; then
2233
echo "Installing Claude Code (npm)"

0 commit comments

Comments
 (0)