Skip to content

Commit d01e596

Browse files
committed
[NDR-307] Catch workspace names over 7 characters
1 parent 7cafe0c commit d01e596

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/build_sandbox.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ branch=$(echo "$branch" | sed 's/[^a-zA-Z0-9]//g')
1414
branch="${branch,,}"
1515
apply="${APPLY:-false}"
1616

17+
if [ ${#branch} -gt 7 ]; then
18+
echo "Error: your workspace name '$branch' is longer than 7 characters, please start again and choose a workspace less than 7 characters."
19+
exit 1
20+
fi
21+
1722
# Forbidden branches
1823
forbidden_workspaces=("main" "prod" "pre-prod" "ndr-test" "ndr-dev" "preprod" "ndrtest" "ndrdev", "dev", "test")
1924

0 commit comments

Comments
 (0)