Skip to content

Commit

Permalink
Always store project .rvmrc trust keyed by the full, only slightly mu…
Browse files Browse the repository at this point in the history
…nged, path

Prune old-style md5-keyed entries during install
Mention all this in notes
  • Loading branch information
Jack Repenning committed Jul 18, 2011
1 parent ac632c0 commit f23181d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 8 additions & 0 deletions scripts/functions/installer
Expand Up @@ -176,6 +176,9 @@ Upgrade Notes
* rvm_trust_rvmrcs has been changed to rvm_trust_rvmrcs_flag for consistency
* Project rvmrc files are now checked for trust whenever they change, as promised by
the note displayed during the review process
* Ruby package dependency list for your OS is given by:
rvm notes
Expand Down Expand Up @@ -421,6 +424,11 @@ setup_configuration_files()
touch user/rvmrcs
fi
fi

# Prune old (keyed-by-hash) trust entries
grep '^_' user/rvmrcs > user/rvmrcs.new
mv user/rvmrcs.new user/rvmrcs

popd >/dev/null
}

Expand Down
7 changes: 1 addition & 6 deletions scripts/functions/rvmrc
Expand Up @@ -30,12 +30,7 @@ __rvm_md5_for_contents()

__rvm_rvmrc_key()
{
if [[ ${rvm_always_trust_rvmrc_flag:-0} -eq 1 ]]; then
printf "$1"
else
__rvm_md5_for "$1"
fi

printf "$1" | tr '[#/.=]' _
return $?
}

Expand Down

0 comments on commit f23181d

Please sign in to comment.