Add existence check
This commit is contained in:
parent
b51117a2c6
commit
b2b7ccceda
|
|
@ -229,6 +229,15 @@ if bundle_update_flag
|
|||
#command1 = "gem install bundler -v 2.3.3 ; bundle update --all"
|
||||
end
|
||||
#end
|
||||
filedata = File.read(env_pwd+"/built_in_extensions.rb")
|
||||
new_filedata = filedata.gsub(/git:\s*(['"])http:\/\/orbitgit\.cloud/, 'git: \1https://orbitgit.cloud')
|
||||
if new_filedata != filedata
|
||||
open(env_pwd+"/built_in_extensions.rb", 'w') { |f|
|
||||
f.write new_filedata
|
||||
}
|
||||
puts "built_in_extensions.rb: 已將 http 改為 https"
|
||||
end
|
||||
|
||||
filedata = File.read(env_pwd+"/built_in_extensions.rb")
|
||||
exist_str = "gem 'patchfile', git: 'https://orbitgit.cloud/chiu/patch_file.git'"
|
||||
if filedata.include? exist_str
|
||||
|
|
|
|||
Loading…
Reference in New Issue