fix: stop parsing if URL does not have a schema
This commit is contained in:
@@ -14,6 +14,10 @@ queryless_url="${DB_URL%%\?*}";
|
||||
|
||||
# get URL's schema
|
||||
schema="${queryless_url%//*}";
|
||||
if test "${schema}" = "${queryless_url}"; then
|
||||
echo >&2 "database URLs must start with schema (i.e.: mysql://)"\
|
||||
&& exit 2;
|
||||
fi
|
||||
schemaless_url=${queryless_url#*//};
|
||||
|
||||
# left hand is everything until the first @ (the user part)
|
||||
|
||||
Reference in New Issue
Block a user