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,6 +217,7 @@ class CommandShell
#
def process_autoruns(datastore)
# Read the initial output and mash it into a single line
if (not self.info or self.info.empty?)
initial_output = shell_read(-1, 0.01)
if (initial_output)
initial_output.gsub!(/[\r\n\t]+/, ' ')
@ -225,6 +226,7 @@ class CommandShell
# Set the inital output to .info
self.info = initial_output
end
end
if (datastore['InitialAutoRunScript'] && datastore['InitialAutoRunScript'].empty? == false)
args = datastore['InitialAutoRunScript'].split