From b77c6749620daf3245a0e4b50ec13dc4b6af6486 Mon Sep 17 00:00:00 2001 From: rwxrob Date: Wed, 15 Dec 2021 23:19:22 -0500 Subject: [PATCH] Fix false return values for config (closes #8) --- cmd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd b/cmd index 44260d7..29bc000 100755 --- a/cmd +++ b/cmd @@ -416,12 +416,14 @@ _config_dir() { [[ -n "$1" ]] && echo "$dir/$1" && return 0 printf "%s" "$dir" [[ -t 1 ]] && echo + return 0 } _config_path() { local file=${1:-values} printf "%s/%s" "$(_config_dir)" "$file" [[ -t 1 ]] && echo + return 0 } _config_set() { @@ -432,8 +434,9 @@ _config_set() { } _config_get() { - printf "${CONF[$1]}" + printf "%s" "${CONF[$1]}" [[ -t 1 ]] && echo + return 0 } _config_read() {