Skip to content

Commit 8c4decf

Browse files
committed
fix(shell): restrict project_open theme lookup to regular files
1 parent c69b1c9 commit 8c4decf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shell/aliases

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ project_open() {
401401
# Locate the first Composer theme. find (not a glob) so a project with no
402402
# web/app/themes tree returns cleanly instead of tripping zsh NOMATCH now
403403
# that non-WordPress projects can be resolved.
404-
THEME_PATH="$(find "${NEW_PATH}/web/app/themes" -mindepth 2 -maxdepth 2 -name composer.json 2>/dev/null | LC_ALL=C sort | head -n1)"
404+
THEME_PATH="$(find "${NEW_PATH}/web/app/themes" -mindepth 2 -maxdepth 2 -type f -name composer.json 2>/dev/null | LC_ALL=C sort | head -n1)"
405405
THEME_PATH="${THEME_PATH%composer.json}"
406406
if [ -z "${THEME_PATH}" ]; then
407407
echo "No theme available" >&2

0 commit comments

Comments
 (0)