diff options
| author | Leah Rowe <leah@libreboot.org> | 2025-04-26 22:07:52 +0100 | 
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2025-04-26 22:07:52 +0100 | 
| commit | 9ec721534083fae3ac23af36f0417db867fd0ded (patch) | |
| tree | ed7fcc8cd34a870bb09c8f91fb01a380e06edee1 | |
| parent | 18ad654a1f71dd8734bf45d6c9f7062b80bdd144 (diff) | |
init.sh setvars: make err a printf for eval
setvars is always invoked with eval, so make the error
condition a message for eval, to ensure that it is reliably
handled, in case of error condition.
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | include/init.sh | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/include/init.sh b/include/init.sh index 1a383bd7..88d70b8c 100644 --- a/include/init.sh +++ b/include/init.sh @@ -18,7 +18,11 @@ err="err_"  setvars()  { -	_setvars="" && [ $# -lt 2 ] && $err "setvars: too few arguments" +	_setvars="" +	if [ $# -lt 2 ]; then +		printf "\$err \"setvars: too few args\"" +		return 0 +	fi  	val="$1" && shift 1 && for var in "$@"; do  		_setvars="$var=\"$val\"; $_setvars"  	done | 
