# File lib/googleauth/credentials_loader.rb, line 96
      def from_env scope = nil, options = {}
        options = interpret_options scope, options
        if ENV.key?(ENV_VAR) && !ENV[ENV_VAR].empty?
          path = ENV[ENV_VAR]
          raise "file #{path} does not exist" unless File.exist? path
          File.open path do |f|
            return make_creds options.merge(json_key_io: f)
          end
        elsif service_account_env_vars? || authorized_user_env_vars?
          return make_creds options
        end
      rescue StandardError => e
        raise "#{NOT_FOUND_ERROR}: #{e}"
      end