Fix OS variable capture - use get_os_info() to properly retrieve values

- Use eval with get_os_info() to capture OS variables
- Ensures variables are properly set in current shell scope
- Fixes issue where variables were detected but not available to install_dependencies()
This commit is contained in:
master3395
2026-01-26 20:54:07 +01:00
parent 1351de7590
commit f928578abb

View File

@@ -218,9 +218,13 @@ detect_operating_system() {
print_status "$BLUE" "🔍 Detecting operating system..."
if detect_os; then
# Variables are set by detect_os() in the sourced module
# Get OS information using get_os_info() to ensure we capture the values
# This outputs variable assignments that we can eval
eval $(get_os_info)
# Export them to ensure they're available to all functions
export SERVER_OS OS_FAMILY PACKAGE_MANAGER ARCHITECTURE
print_status "$GREEN" "✅ OS detected: $SERVER_OS ($OS_FAMILY)"
print_status "$GREEN" "✅ Package manager: $PACKAGE_MANAGER"
print_status "$GREEN" "✅ Architecture: $ARCHITECTURE"