Fix _rails completion

fix directory traversal
This commit is contained in:
Shohei YOSHIDA 2026-03-08 21:44:09 +09:00
parent 410498264d
commit 769b2aac92
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 1 additions and 1 deletions

View File

@ -513,7 +513,7 @@ _rails_is_in_app() {
if [[ -f "${dir}/bin/rails" ]]; then
return 0
fi
dir="${dir/*}"
dir="${dir%/*}"
done
return 1