catch for nil (#2237)

This commit is contained in:
Isaac Powell
2021-11-26 15:20:48 +10:00
committed by GitHub
parent 66257f1cf3
commit 9181c83a87

2
beef
View File

@@ -57,7 +57,7 @@ if File.exist?("#{$root_dir}git") && BeEF::Core::Console::CommandLine.parse[:upd
puts '-- BeEF Update Available --'
print 'Would you like to update to lastest version? y/n: '
response = gets
`git pull && bundle` if response.strip == 'y'
`git pull && bundle` if response&.strip == 'y'
end
rescue Timeout::Error
puts "\nUpdate Skipped with input timeout"