From 8274b405e6803a246cc6ef86330f72bcc83f6a32 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 20 Jul 2026 16:12:15 -0700 Subject: [PATCH] fix: guard get_power_info call with declare -F check get_power_info is defined in PRbL/functions, not in quickinfo.bashrc itself. On systems where PRbL is sourced from an older GitHub copy or the function is unavailable (e.g. WSL, minimal installs), the bare call crashes with 'command not found'. Guard with declare -F so the power block is silently skipped when the function is not loaded. --- lib/skel/.bashrc.d/11-quickinfo.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/skel/.bashrc.d/11-quickinfo.bashrc b/lib/skel/.bashrc.d/11-quickinfo.bashrc index aabfcf1..0c79f4c 100755 --- a/lib/skel/.bashrc.d/11-quickinfo.bashrc +++ b/lib/skel/.bashrc.d/11-quickinfo.bashrc @@ -1183,7 +1183,7 @@ if [ "$show_security_info" = true ]; then fi # Power information if enabled -if [ "$show_power_info" = true ]; then +if [ "$show_power_info" = true ] && declare -F get_power_info >/dev/null; then get_power_info if [[ "$system_power" != "N/A" || "$cpu_power" != "N/A" || "$gpu_power" != "N/A" || "$battery_power" != "N/A" ]]; then boxline ""