Merge pull request #4958 from Felixoid/entrypoint_skip_empty

Issue #4947, add check for empty variable
This commit is contained in:
alesapin 2019-04-10 15:50:45 +03:00 committed by GitHub
commit f40ab95739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,8 @@ for dir in "$DATA_DIR" \
"$USER_PATH" \
"$FORMAT_SCHEMA_PATH"
do
# check if variable not empty
[ -z "$dir" ] && continue
# ensure directories exist
if ! mkdir -p "$dir"; then
echo "Couldn't create necessary directory: $dir"