Add proper name valoidation in rename command, don't allow blanks in names

This commit is contained in:
Jose
2020-05-09 13:59:58 -04:00
parent a607dc2719
commit e07f6cb0ed
2 changed files with 9 additions and 7 deletions
+2 -2
View File
@@ -445,8 +445,8 @@ else
fi
## don't allow for dots(.) in container names
if echo "${NAME}" | grep -q "[.]"; then
echo -e "${COLOR_RED}Container names may not contain a dot(.)!${COLOR_RESET}"
if echo "${NAME}" | grep -Eq '[.]|\ '; then
echo -e "${COLOR_RED}Container names may not contain a dot(.) nor spaces!${COLOR_RESET}"
exit 1
fi