Strictly match against package names (#9727)

automerge
This commit is contained in:
Ryo Onodera 2020-04-27 12:56:00 +09:00 committed by GitHub
parent 9918539229
commit 41eba7d1c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -12,8 +12,9 @@ parsed_update_args="$(
)"
package=$(echo "$parsed_update_args" | awk '{print $2}' | grep -o "^[^:]*")
if [[ -n $parsed_update_args ]]; then
# find other Cargo.lock files and update them, excluding the default Cargo.lock
# shellcheck disable=SC2086
for lock in $(git grep --files-with-matches --fixed-strings "$package" :**/Cargo.lock); do
for lock in $(git grep --files-with-matches '^name = "'$package'"$' :**/Cargo.lock); do
_ scripts/cargo-for-all-lock-files.sh \
"$lock" -- \
update $parsed_update_args