Skip to content

Commit

Permalink
Fix: Strip path prefix in dirname
Browse files Browse the repository at this point in the history
Fixing shellcheck errors introduced a regression.

Change-Id: I4be9b2feabe81b7c10b693af7894916320f496dc
Signed-off-by: Anil Belur <[email protected]>
  • Loading branch information
askb committed Feb 8, 2024
1 parent 3e14028 commit e532b80
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ for PROJECT in /tmp/r/org/opendaylight/*; do
continue
fi
echo "Checking $PROJECT"
if [[ "$ALLOW_PROJECTS" != *"$PROJECT"* ]]; then
# strip path from the dirname
base_dir="$(basename -- "$PROJECT")"
if [[ "$ALLOW_PROJECTS" != *"$base_dir"* ]]; then
echo "ERROR: Not allowed project $PROJECT pulled"
EXIT_CODE="1"
fi
Expand Down

0 comments on commit e532b80

Please sign in to comment.