From 14610467600dde19267c045b75b2d18d25ef2cae Mon Sep 17 00:00:00 2001 From: Postmodern Date: Sun, 12 Oct 2014 14:01:58 -0700 Subject: [PATCH] Prevent foreman export from expanding the current/ symlink `foreman export` will default to using `Dir.pwd` as the projects directory. Unfortunately, `Dir.pwd` automatically expands symlinks to their destinations, so `/path/to/current` becomes `/path/to/releases/N`. Instead, explicitly specify the `/path/to/current/`. --- lib/mina/foreman.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mina/foreman.rb b/lib/mina/foreman.rb index 21266bd8..43f848c8 100644 --- a/lib/mina/foreman.rb +++ b/lib/mina/foreman.rb @@ -48,7 +48,7 @@ desc 'Export the Procfile to Ubuntu upstart scripts' task :export do sudo_cmd = "sudo" if foreman_sudo - export_cmd = "#{sudo_cmd} bundle exec foreman export #{foreman_format} #{foreman_location} -a #{foreman_app} -u #{foreman_user} -l #{foreman_log}" + export_cmd = "#{sudo_cmd} bundle exec foreman export #{foreman_format} #{foreman_location} -a #{foreman_app} -u #{foreman_user} -d #{deploy_to!}/#{current_path!} -l #{foreman_log}" queue %{ echo "-----> Exporting foreman procfile for #{foreman_app}"