about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/unicorn/configurator.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb
index d9af75e..93b7bf4 100644
--- a/lib/unicorn/configurator.rb
+++ b/lib/unicorn/configurator.rb
@@ -354,7 +354,8 @@ module Unicorn
     def working_directory(path)
       # just let chdir raise errors
       path = File.expand_path(path)
-      Dir.chdir(HttpServer::START_CTX[:cwd] = path)
+      Dir.chdir(path)
+      HttpServer::START_CTX[:cwd] = ENV["PWD"] = path
     end
 
     # expands "unix:path/to/foo" to a socket relative to the current path