Skip to content

Commit 32680df

Browse files
committed
Merge branch 'todb-r7-fix-msfupdate' into rapid7
[Closes rapid7#883][Closes rapid7#882]
2 parents db4ba47 + a31984c commit 32680df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

msfupdate

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ end
1111

1212
@args = ARGV.dup
1313

14+
# May be changed
15+
@configdir = File.expand_path(File.join(File.dirname(msfbase), "data", "svn"))
16+
1417
Dir.chdir(File.dirname(msfbase))
1518

1619
$stderr.puts "[*]"
@@ -32,15 +35,12 @@ end
3235
# as a single argument via the multi-arg syntax for system() below.
3336
# TODO: Test this spaces business. I don't buy it. -todb
3437
@configdir_index = i
35-
@configdir = File.join(File.dirname(msfbase), "data", "svn")
3638
end
3739
end
3840

3941
@args.delete_at @wait_index if @wait_index
40-
@args.delete_at @configdir_index if @configdir_index
41-
42+
@args.push("--config-dir=#{@configdir}") unless @configdir_index
4243
@args.push("--non-interactive")
43-
@args.push("--config-dir=#{@configdir}") if @configdir_index
4444

4545
res = system("svn", "cleanup")
4646
if res.nil?

0 commit comments

Comments
 (0)