fix: disable core Gemfile overwrite from announcement gem

This commit is contained in:
rulingcom 2026-07-03 20:09:45 +08:00
parent a51eecbc31
commit 029cc02d11
1 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ require "announcement/version"
require 'json'
require 'yaml'
require 'fileutils'
require 'open3'
bundle_update_flag = ARGV[0]=='update' || ARGV[0]=='install'
if bundle_update_flag
env_pwd = ENV['PWD']
@ -191,7 +192,7 @@ if bundle_update_flag
end
end
bundler_with_clean_env{%x[cp -f '#{env_pwd}'/Gemfile '#{env_pwd}'/Gemfile.bak123]}
bundler_with_clean_env{%x[cp -f '#{app_path}'/temp_file/Gemfile '#{env_pwd}'/Gemfile]}
#bundler_with_clean_env{%x[cp -f '#{app_path}'/temp_file/Gemfile '#{env_pwd}'/Gemfile]}
check_version = %x[cd #{env_pwd} && git rev-list `git rev-parse --abbrev-ref HEAD` | grep 2f23511469505bd114df2c863a477a8730bcdefa]
if check_version.strip != '' #update mongoid version
command4 = ""
@ -250,7 +251,7 @@ if bundle_update_flag
bundler_with_clean_env do
puts env_pwd
puts mode
exec("cd #{env_pwd} && env -i HOME=\"$HOME\" bash -l -c \"#{all_command}\" ;screen -d -m -S auto_reopen_#{dir_name} bash -c \"#{use_cmd} #{restart_cmd};#{watch_dog_cmd}\" ")
Open3.capture3("cd #{env_pwd} && env -i HOME=\"$HOME\" bash -l -c \"#{all_command}\" ;screen -d -m -S auto_reopen_#{dir_name} bash -c \"#{use_cmd} #{restart_cmd};#{watch_dog_cmd}\" ")
end
end
now_priority = Thread.current.priority.to_i