Skip to content

Commit e6e0961

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 e6e0961

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/bash
22
# Hornet Interactive Installer
33
#
4-
# One-command setup:
5-
# curl -sSf https://raw.githubusercontent.com/modem-dev/hornet/main/install.sh | sudo bash
6-
#
7-
# Or from a clone:
4+
# From a clone (recommended):
85
# sudo ./install.sh
96
#
7+
# Or one-liner:
8+
# git clone https://github.com/modem-dev/hornet.git ~/hornet && sudo ~/hornet/install.sh
9+
#
1010
# What this does:
1111
# 1. Detects distro, installs system prerequisites
1212
# 2. Clones the repo (or uses existing clone)
@@ -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)