Skip to content

Commit

Permalink
Better user messages for __rvm_ask_to_trust().
Browse files Browse the repository at this point in the history
Improves the user experience by explaining the (un)trust process in more
detail.
  • Loading branch information
Todd A. Jacobs committed Apr 8, 2011
1 parent 6ebc239 commit 108903f
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions scripts/functions/rvmrc
Expand Up @@ -149,16 +149,27 @@ __rvm_ask_to_trust()
===============================================================
= NOTICE: =
===============================================================
= RVM has encountered a not yet trusted .rvmrc file in the =
= current working directory which may contain nasty code. =
= RVM has encountered a new or modified .rvmrc file in the =
= current working directory. Resource files may execute =
= arbitrary instructions, so RVM will not use an .rvmrc file =
= that has not been explicitly marked as 'trusted.' =
= =
= Examine the contents of this file to be sure the contents =
= are good before trusting it! =
= Examine the contents of this file carefully to be sure the =
= contents are good before trusting it! =
= =
= You will now be given a chance to read the .rvmrc file =
= before deciding whether or not its contents are safe. After =
= reading the file, you will be prompted 'yes or no' to set =
= the trust level for this particular version of the file. =
= =
= Note: You will be re-prompted each time the .rvmrc file =
= changes, and may change the trust setting manually at any =
= time. =
= =
= Press 'q' to exit the reader when finished reading the file =
===============================================================
(press enter to continue when ready)
(press enter to review the .rvmrc file)
"

Expand All @@ -171,11 +182,16 @@ read anykey
Examining "$1" complete.
================================================================
= Trusting an .rvmrc file means that whenever you cd into the =
= directory RVM will execute this .rvmrc script in your shell =
= Trusting an .rvmrc file means that whenever you cd into this =
= directory, RVM will run this .rvmrc script in your shell. =
= =
= If the contents of the file change, you will be re-prompted =
= to review the file and adjust its trust settings. You may =
= also change the trust settings manually at any time with =
= the 'rvm rvmrc' command. =
= =
= Now that you have examined the contents of the file, do you =
= wish to trust this .rvmrc from now on? =
= wish to trust this particular .rvmrc? =
================================================================
(yes or no)"
Expand Down

0 comments on commit 108903f

Please sign in to comment.