def getenv(key=nil)
      if @rye_getenv && @rye_getenv.empty? && self.can?(:env)
        vars = self.quietly { env } rescue []
        vars.each do |nvpair| 
          # Parse "GLORIA_HOME=/gloria/lives/here" into a name/value
          # pair. The regexp ensures we split only at the 1st = sign
          n, v = nvpair.scan(/\A([\w_-]+?)=(.+)\z/).flatten
          @rye_getenv[n] = v
        end
      end
      key.nil? ? @rye_getenv : @rye_getenv[key.to_s]
    end
def getenv(key=nil)
      if @rye_getenv && @rye_getenv.empty? && self.can?(:env)
        vars = self.quietly { env } rescue []
        vars.each do |nvpair| 
          # Parse "GLORIA_HOME=/gloria/lives/here" into a name/value
          # pair. The regexp ensures we split only at the 1st = sign
          n, v = nvpair.scan(/\A([\w_-]+?)=(.+)\z/).flatten
          @rye_getenv[n] = v
        end
      end
      key.nil? ? @rye_getenv : @rye_getenv[key.to_s]
    end
Returns the hash containing the parsed output of "env" on the
 remote machine. If the initialize option +:getenv+ was set to
 false, this will return an empty hash.
 This is a lazy loaded method so it fetches the remote envvars
 the first time this method is called.

      puts rbox.getenv['HOME']    # => "/home/gloria" (remote)

 NOTE: This method should not raise an exception under normal
 circumstances.