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.
This commit is contained in:
parent
cb8f96a123
commit
8274b405e6
1 changed files with 1 additions and 1 deletions
|
|
@ -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 ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue