Skip to content

Commit

Permalink
Always exit from maybe_wait_and_exit
Browse files Browse the repository at this point in the history
Previously calling maybe_wait_and_exit wouldn't actually exit.  This was
the wrong behavior.
  • Loading branch information
bturner-r7 committed Nov 15, 2013
1 parent 8ea83ed commit 730edc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions msfupdate
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ Options:
raise RuntimeError, "Cannot determine checkout type: `#{@msfbase_dir}'"
end
end

maybe_wait_and_exit(0)
end

def update_git!
Expand Down Expand Up @@ -240,6 +238,8 @@ Options:
stdout.puts ""
stdin.readline
exit exit_code
else
exit exit_code
end
end

Expand All @@ -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
2 changes: 1 addition & 1 deletion spec/msfupdate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def dummy_apt_pathname
# 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

Expand Down

0 comments on commit 730edc4

Please sign in to comment.