Skip to content

Commit f247379

Browse files
committed
Handle the old wait/nowait shift behavior.
The old msfupdate would shift the first argument off the stack regardless what it was. We have two possible candaidates now, wait and nowait. Shouldn't be any others. [SeeRM rapid7#7297]
1 parent 9a0a063 commit f247379

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

msfupdate

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ end
2828

2929
@args.each_with_index do |arg,i|
3030
case arg
31-
when "wait"
31+
# Handle the old wait/nowait argument behavior
32+
when "wait", "nowait"
3233
@wait_index = i
34+
@actually_wait = (arg == "wait")
35+
# Handle passing a config-dir especially
3336
when /--config-dir/
3437
# Spaces in the directory should be fine since this whole thing is passed
3538
# as a single argument via the multi-arg syntax for system() below.
@@ -54,7 +57,7 @@ else
5457
system("svn", "update", *@args)
5558
end
5659

57-
if @wait_index
60+
if @actually_wait
5861
$stderr.puts ""
5962
$stderr.puts "[*] Please hit enter to exit"
6063
$stderr.puts ""

0 commit comments

Comments
 (0)