only set .info if its nil or empty

git-svn-id: file:///home/svn/framework3/trunk@8831 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-03-16 15:20:48 +00:00
parent 18075f9b68
commit 32fb7653ca
1 changed files with 8 additions and 6 deletions

View File

@ -217,13 +217,15 @@ class CommandShell
#
def process_autoruns(datastore)
# Read the initial output and mash it into a single line
initial_output = shell_read(-1, 0.01)
if (initial_output)
initial_output.gsub!(/[\r\n\t]+/, ' ')
initial_output.strip!
if (not self.info or self.info.empty?)
initial_output = shell_read(-1, 0.01)
if (initial_output)
initial_output.gsub!(/[\r\n\t]+/, ' ')
initial_output.strip!
# Set the inital output to .info
self.info = initial_output
# Set the inital output to .info
self.info = initial_output
end
end
if (datastore['InitialAutoRunScript'] && datastore['InitialAutoRunScript'].empty? == false)