Skip to content

Commit a50a7c9

Browse files
Dennis-SEGclaude
andcommitted
Fix: Improve repository detection for source installation
The previous check for bin directory would incorrectly match /bin when running the script from /tmp/install.sh (via curl), causing the installer to skip git clone and copy system binaries instead of Vesta binaries. Changed the check to look for a Vesta-specific file (bin/v-add-user) instead of just checking if a bin directory exists. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 5b8b735 commit a50a7c9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

install/vst-install-debian-modern.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@ echo "Installing Vesta from source repository..."
390390
# Determine repository location
391391
REPO_DIR="$(cd "$(dirname "$0")/.." 2>/dev/null && pwd)"
392392

393-
# Check if we have a valid repository (bin directory should exist)
394-
if [ ! -d "$REPO_DIR/bin" ]; then
395-
echo "Repository not found locally, cloning from GitHub..."
393+
# Check if we have a valid Vesta repository (look for vesta-specific files)
394+
if [ ! -f "$REPO_DIR/bin/v-add-user" ]; then
395+
echo "Vesta repository not found locally, cloning from GitHub..."
396396
REPO_DIR="/tmp/vesta-repo"
397397
rm -rf $REPO_DIR
398398
git clone --depth 1 https://github.com/Dennis-SEG/vesta.git $REPO_DIR

install/vst-install-rhel-modern.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ echo "Installing Vesta from source repository..."
171171
# Determine repository location
172172
REPO_DIR="$(cd "$(dirname "$0")/.." 2>/dev/null && pwd)"
173173

174-
# Check if we have a valid repository (bin directory should exist)
175-
if [ ! -d "$REPO_DIR/bin" ]; then
176-
echo "Repository not found locally, cloning from GitHub..."
174+
# Check if we have a valid Vesta repository (look for vesta-specific files)
175+
if [ ! -f "$REPO_DIR/bin/v-add-user" ]; then
176+
echo "Vesta repository not found locally, cloning from GitHub..."
177177
REPO_DIR="/tmp/vesta-repo"
178178
rm -rf $REPO_DIR
179179
git clone --depth 1 https://github.com/Dennis-SEG/vesta.git $REPO_DIR

install/vst-install-ubuntu-modern.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,9 @@ echo "Installing Vesta from source repository..."
595595
# Determine repository location
596596
REPO_DIR="$(cd "$(dirname "$0")/.." 2>/dev/null && pwd)"
597597

598-
# Check if we have a valid repository (bin directory should exist)
599-
if [ ! -d "$REPO_DIR/bin" ]; then
600-
echo "Repository not found locally, cloning from GitHub..."
598+
# Check if we have a valid Vesta repository (look for vesta-specific files)
599+
if [ ! -f "$REPO_DIR/bin/v-add-user" ]; then
600+
echo "Vesta repository not found locally, cloning from GitHub..."
601601
REPO_DIR="/tmp/vesta-repo"
602602
rm -rf $REPO_DIR
603603
git clone --depth 1 https://github.com/Dennis-SEG/vesta.git $REPO_DIR

0 commit comments

Comments
 (0)