Skip to content

Commit

Permalink
Ensure exact matching for org and space names in cf CLI commands
Browse files Browse the repository at this point in the history
  • Loading branch information
bonzofenix committed Aug 15, 2024
1 parent 0016d20 commit e2f344b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/autoscaler/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function find_or_create_org(){
function find_or_create_space(){
local space_name="$1"
if ! cf spaces | grep --quiet --regexp="${space_name}"; then
cf create-space "${space_name}"
cf create-space "^${space_name}$"
fi
echo "targeting space ${space_name}"
cf target -s "${space_name}"
Expand All @@ -115,6 +115,6 @@ function cf_target(){
local org_name="$1"
local space_name="$2"

find_or_create_org "${org_name}"
find_or_create_org "^${org_name}$"
find_or_create_space "${space_name}"
}

0 comments on commit e2f344b

Please sign in to comment.