Skip to content

Commit ad93699

Browse files
committed
Fix shellcheck error SC2163
1 parent f93eba4 commit ad93699

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

call_host.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ if is_zsh; then
4444
else
4545
# bash
4646
export_func(){
47-
export -f "$1" 2>/dev/null || true
47+
[ -n "$1" ] || return
48+
eval "export -f $1" 2>/dev/null || true
4849
}
4950
declare_assoc(){
5051
# create named associative array in bash

0 commit comments

Comments
 (0)