about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-03 19:53:13 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-03 23:37:42 -0800
commitd69f794d53a352d0cfdd500ca58589cc8babf167 (patch)
treea488cef151e48fba5e46f602cd93d1d983c4b666
parent3afcd3e4c340624a59a9eccc8bb1c10f70216901 (diff)
downloadunicorn-d69f794d53a352d0cfdd500ca58589cc8babf167.tar.gz
Just in case anything depends on it, we'll have it set
correctly because it's usually set by the $SHELL
-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