diff --git a/msfupdate b/msfupdate index 88752117cf..ce32e30254 100755 --- a/msfupdate +++ b/msfupdate @@ -119,8 +119,6 @@ Options: raise RuntimeError, "Cannot determine checkout type: `#{@msfbase_dir}'" end end - - maybe_wait_and_exit(0) end def update_git! @@ -240,6 +238,8 @@ Options: stdout.puts "" stdin.readline exit exit_code + else + exit exit_code end end @@ -266,4 +266,5 @@ if __FILE__ == $PROGRAM_NAME cli = Msfupdate.new(File.dirname(msfbase)) cli.parse_args(ARGV.dup) cli.run! + cli.maybe_wait_and_exit end diff --git a/spec/msfupdate_spec.rb b/spec/msfupdate_spec.rb index f23b23fb01..b911b5a156 100644 --- a/spec/msfupdate_spec.rb +++ b/spec/msfupdate_spec.rb @@ -49,7 +49,7 @@ describe Msfupdate do # By default, we want to ensure tests never actually try to execute any # of the update methods unless we are explicitly testing them subject.stub(:update_apt!) - subject.stub(:update_binary_installer!) + subject.stub(:update_binary_install!) subject.stub(:update_git!) end