Signed-off-by: nicobo <nicobo@users.noreply.github.com>
This commit is contained in:
parent
5e0d2b2b79
commit
622cdd6259
|
@ -27,8 +27,8 @@ file_env() {
|
|||
local var="$1"
|
||||
local fileVar="${var}_FILE"
|
||||
local def="${2:-}"
|
||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||
local varValue="`env | grep -E \"^${var}=\" | sed -E -e \"s/^${var}=//\"`"
|
||||
local fileVarValue="`env | grep -E \"^${fileVar}=\" | sed -E -e \"s/^${fileVar}=//\"`"
|
||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue