Fix bug.
This commit is contained in:
parent
4b12eff642
commit
ea3117a941
|
@ -146,7 +146,7 @@ class Admin::SitePanelController < OrbitAdminController
|
|||
elsif params[:type] == 'detect_sites'
|
||||
extra_text = ""
|
||||
if params[:key].present?
|
||||
extra_text = "[#{params[:key].gsub(/[\(\)\[\]]/){|ff| "\\"+ff }}]"
|
||||
extra_text = "['#{params[:key].gsub(/[\(\)\[\]]/){|ff| "\\"+ff }}']"
|
||||
end
|
||||
Thread.new do
|
||||
system("bundle exec rake create_site:detect_sites#{extra_text}")
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace :create_site do
|
|||
if output.include?("sudo:") && output.include?("command not found")
|
||||
output = session.exec!(command)
|
||||
end
|
||||
return output
|
||||
return output.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')
|
||||
end
|
||||
def auto_update_infos(info)
|
||||
if @is_multithread
|
||||
|
|
|
@ -46,6 +46,6 @@ namespace :create_site do
|
|||
if output.include?("sudo:") && output.include?("command not found")
|
||||
output = session.exec!(command)
|
||||
end
|
||||
return output
|
||||
return output.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')
|
||||
end
|
||||
end
|
|
@ -136,7 +136,7 @@ namespace :create_site do
|
|||
if output.include?("sudo:") && output.include?("command not found")
|
||||
output = session.exec!(command)
|
||||
end
|
||||
return output
|
||||
return output.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')
|
||||
end
|
||||
def update_thread_infos_for_exec(info,update_last=false)
|
||||
if update_last
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace :create_site do
|
|||
if output.include?("sudo:") && output.include?("command not found")
|
||||
output = session.exec!(command)
|
||||
end
|
||||
return output
|
||||
return output.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')
|
||||
end
|
||||
def update_thread_infos_for_exec(info,update_last=false)
|
||||
if update_last
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace :create_site do
|
|||
if output.include?("sudo:") && output.include?("command not found")
|
||||
output = session.exec!(command)
|
||||
end
|
||||
return output
|
||||
return output.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')
|
||||
end
|
||||
def update_infos(info)
|
||||
puts info
|
||||
|
|
|
@ -171,7 +171,7 @@ namespace :create_site do
|
|||
if output.include?("sudo:") && output.include?("command not found")
|
||||
output = session.exec!(command)
|
||||
end
|
||||
return output
|
||||
return output.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')
|
||||
end
|
||||
def update_thread_infos(info)
|
||||
puts info
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace :exec_commands do
|
|||
if output.include?("sudo:") && output.include?("command not found")
|
||||
output = session.exec!(command)
|
||||
end
|
||||
return output
|
||||
return output.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')
|
||||
end
|
||||
def update_infos_for_exec(info,update_last=false,update_array=false)
|
||||
return if @site_construct.nil?
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace :create_site do
|
|||
if output.include?("sudo:") && output.include?("command not found")
|
||||
output = session.exec!(command)
|
||||
end
|
||||
return output
|
||||
return output.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')
|
||||
end
|
||||
def update_thread_infos(info)
|
||||
puts info
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace :create_site do
|
|||
if output.include?("sudo:") && output.include?("command not found")
|
||||
output = session.exec!(command)
|
||||
end
|
||||
return output
|
||||
return output.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')
|
||||
end
|
||||
def update_thread_infos(info)
|
||||
puts info
|
||||
|
|
Loading…
Reference in New Issue