···133133 # and then set it back to what it was originally.
134134 alias original_install_gem_from_spec install_gem_from_spec
135135 def install_gem_from_spec(spec, standalone = false, worker = 0)
136136- pre_installer = "pre-installers/#{spec.name}"
137137- if File.exist?(pre_installer)
138138- system(pre_installer)
139139- unless $?.success?
140140- Bundler.ui.error "The pre-installer script for #{spec.name} failed!"
141141- exit 1
142142- end
143143- env = eval(Bundler.read_file("env/#{spec.name}"))
136136+ env_dump = "env/#{spec.name}"
137137+ if File.exist?(env_dump)
138138+ env = eval(Bundler.read_file(env_dump))
144139 unless env
145140 Bundler.ui.error "The environment variables for #{spec.name} could not be loaded!"
146141 exit 1