mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Don't use ENV['PWD'] on windows. Fixes #1023
This commit is contained in:
parent
5bf140cac7
commit
5654d558fd
2 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,6 @@ module Puma
|
|||
end
|
||||
|
||||
def self.windows?
|
||||
RUBY_PLATFORM =~ /mswin32|ming32/
|
||||
RUBY_PLATFORM =~ /mswin|ming|cygwin/
|
||||
end
|
||||
end
|
||||
|
|
|
@ -316,6 +316,11 @@ module Puma
|
|||
if dir = @options[:directory]
|
||||
@restart_dir = dir
|
||||
|
||||
elsif Puma.windows?
|
||||
# I guess the value of PWD is garbage on windows so don't bother
|
||||
# using it.
|
||||
@restart_dir = Dir.pwd
|
||||
|
||||
# Use the same trick as unicorn, namely favor PWD because
|
||||
# it will contain an unresolved symlink, useful for when
|
||||
# the pwd is /data/releases/current.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue