1
0
Fork 0
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:
Evan Phoenix 2016-07-23 21:36:05 -07:00
parent 5bf140cac7
commit 5654d558fd
2 changed files with 6 additions and 1 deletions

View file

@ -6,6 +6,6 @@ module Puma
end
def self.windows?
RUBY_PLATFORM =~ /mswin32|ming32/
RUBY_PLATFORM =~ /mswin|ming|cygwin/
end
end

View file

@ -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.