From be6d143cc840ca74aa5b635eb50d7fb32323d895 Mon Sep 17 00:00:00 2001 From: chiu Date: Mon, 17 Feb 2020 21:57:13 +0800 Subject: [PATCH] use ; will cause the command not execute after complete bundle update --- announcement.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/announcement.gemspec b/announcement.gemspec index 04073e8..a67058c 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -46,7 +46,7 @@ if old_gemfile_text != new_gemfile_text command2 = '' if old_playground != new_playground puts 'updating playground' - command2 = "cp -f #{app_path}/temp_file/playground_controller.rb #{env_pwd}/app/controllers/admin/playground_controller.rb ;" + command2 = "cp -f #{app_path}/temp_file/playground_controller.rb #{env_pwd}/app/controllers/admin/playground_controller.rb &&" #File.open(ENV['PWD']+'/app/controllers/admin/playground_controller.rb', 'w') do |file| # file.write new_playground #end @@ -56,7 +56,7 @@ if old_gemfile_text != new_gemfile_text command3 = '' if old_multithread != new_multithread puts 'updating multithread' - command3 = "cp -f #{app_path}/temp_file/multithread.rb #{env_pwd}/app/models/multithread.rb ;" + command3 = "cp -f #{app_path}/temp_file/multithread.rb #{env_pwd}/app/models/multithread.rb &&" #File.open(ENV['PWD']+'/app/models/multithread.rb', 'w') do |file| # file.write new_multithread #end @@ -91,7 +91,7 @@ if old_gemfile_text != new_gemfile_text f.puts exist_str } 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" + 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" a = Thread.start do Bundler.with_clean_env do puts env_pwd