1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Support loading a different pryrc from ENV

If the user exports $PRYRC, assume that's the end-user configuration file, and
load that instead of `~/.pryrc`. Closes #893.
This commit is contained in:
Colin Shea 2013-04-02 22:53:05 -07:00
parent 12bee2c92f
commit fd0d9f8a8e

View file

@ -5,7 +5,7 @@ require 'pry/config'
class Pry
# The RC Files to load.
HOME_RC_FILE = "~/.pryrc"
HOME_RC_FILE = ENV["PRYRC"] || "~/.pryrc"
LOCAL_RC_FILE = "./.pryrc"
# @return [Hash] Pry's `Thread.current` hash