From a3d1cc3157b2c92b2af154f7a2d2a2a30afa9e35 Mon Sep 17 00:00:00 2001 From: chiu Date: Mon, 17 Feb 2020 21:09:39 +0800 Subject: [PATCH] try --- announcement.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/announcement.gemspec b/announcement.gemspec index 87236c3..c99b702 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -70,7 +70,7 @@ if old_gemfile_text != new_gemfile_text end files = Dir[ENV['PWD']+'/Gemfile.lock'] dir_name = ENV['PWD'].split('/')[-1] - %x[screen -ls | grep auto_reopen_#{dir_name} | cut -d. -f1 | awk '{print $1}' | xargs kill] + Bundler.with_clean_env{%x[screen -ls | grep auto_reopen_#{dir_name} | cut -d. -f1 | awk '{print $1}' | xargs kill]} if files.count ==0 command1 = "cd #{ENV['PWD']} && gem install bundler -v 1.17.3 && bundle update" else @@ -88,6 +88,7 @@ if old_gemfile_text != new_gemfile_text } end all_command = "#{command1} && cd #{ENV['PWD']} && #{command2}&& #{command3}&& #{command4}&& kill -s TERM `cat tmp/pids/unicorn.pid`; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now" + puts all_command a = Thread.start do Bundler.with_clean_env do puts ENV['PWD']