From 5f47e995bca36bc9715ca08a3dc815d78ca6e888 Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 10:25:01 -0400 Subject: [PATCH] fix: save repo root path in test_installer.sh for later cd The test script was failing because it changed directories during execution (to /tmp/test-config/interfaces) and then tried to use a relative path to navigate back to the repo root, which failed. Fix: Save the absolute path to repo root at the beginning and reuse it when needed instead of calculating it relative to the current directory. Fixes the error: 'cd: tests/..: No such file or directory' --- tests/test_installer.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_installer.sh b/tests/test_installer.sh index 316c744..a361145 100755 --- a/tests/test_installer.sh +++ b/tests/test_installer.sh @@ -48,6 +48,7 @@ check_package() { echo "Running install.sh (self-contained installer)..." # Navigate to repository root (script is in tests/ directory) cd "$(dirname "$0")/.." +REPO_ROOT="$(pwd)" chmod +x install.sh mkdir -p /tmp/test-config @@ -184,7 +185,7 @@ echo "" # Test --skip-experimental flag echo "Testing --skip-experimental flag..." -cd "$(dirname "$0")/.." +cd "$REPO_ROOT" # Run with --skip-experimental to verify it doesn't fail ./install.sh --config /tmp/test-config-skip --skip-experimental > /tmp/skip-test.log 2>&1 <