Skip to content

Commit 01c15af

Browse files
committed
install: fix eval injection, update usage comments
- Replace eval echo ~user with getent passwd for home dir lookup - Recommend clone+run as primary method over curl|bash
1 parent 340e768 commit 01c15af

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Hornet Interactive Installer
33
#
44
# One-command setup:
5-
# curl -sSf https://raw.githubusercontent.com/modem-dev/hornet/main/install.sh | sudo bash
5+
# git clone https://github.com/modem-dev/hornet.git ~/hornet && sudo ~/hornet/install.sh
66
#
7-
# Or from a clone:
7+
# Or if already cloned:
88
# sudo ./install.sh
99
#
1010
# What this does:
@@ -109,7 +109,7 @@ if ! id "$ADMIN_USER" &>/dev/null; then
109109
die "User '$ADMIN_USER' does not exist."
110110
fi
111111

112-
ADMIN_HOME=$(eval echo "~$ADMIN_USER")
112+
ADMIN_HOME=$(getent passwd "$ADMIN_USER" | cut -d: -f6)
113113
info "Admin user: ${BOLD}$ADMIN_USER${RESET} ($ADMIN_HOME)"
114114

115115
# ── Install prerequisites ────────────────────────────────────────────────────

0 commit comments

Comments
 (0)