Skip to content

Revert "Start server process in dir where cmd was called" #629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lib/spring/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@ def serve(client)
end
end

# Ensure we boot the process in the directory the command was called from,
# not from the directory Spring started in
original_dir = Dir.pwd
Dir.chdir(env['PWD'] || original_dir)

pid = fork {
Process.setsid
IGNORE_SIGNALS.each { |sig| trap(sig, "DEFAULT") }
Expand Down Expand Up @@ -242,7 +237,6 @@ def serve(client)
# (i.e. to prevent `spring rake -T | grep db` from hanging forever),
# even when exception is raised before forking (i.e. preloading).
reset_streams
Dir.chdir(original_dir)
end

def terminate
Expand Down