fix: spurious local keyword broke sysfs based detection (#533) (#534)

The $msg var assigned in sys_interface_check() must not be
local to the func, but must capture and modify the callers'
own local $msg var
This commit is contained in:
Stéphane Lesimple
2026-04-02 23:31:58 +00:00
committed by GitHub
parent 83ebe2f75f
commit f2d871acff

View File

@@ -3329,7 +3329,7 @@ pr_info
# Sets: ret_sys_interface_check_fullmsg # Sets: ret_sys_interface_check_fullmsg
# Returns: 0 if file matched, 1 otherwise # Returns: 0 if file matched, 1 otherwise
sys_interface_check() { sys_interface_check() {
local file regex mode msg mockvarname local file regex mode mockvarname
file="$1" file="$1"
regex="${2:-}" regex="${2:-}"
mode="${3:-}" mode="${3:-}"