Skip to content

Commit

Permalink
Patch for homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanlr committed Nov 8, 2021
1 parent e179b7a commit 8c1b8b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/wpscan/db/updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ def initialize(repo_directory)

FileUtils.mkdir_p(repo_directory.to_s) unless Dir.exist?(repo_directory.to_s)

# When --no-update is passed, return to avoid raising an error if the directory is not writable
# Mainly there for Homebrew: https://github.com/wpscanteam/wpscan/pull/1455
return if ParsedCli.update == false

unless repo_directory.writable?
raise "#{repo_directory} is not writable (uid: #{Process.uid}, gid: #{Process.gid})"
end
Expand Down

0 comments on commit 8c1b8b5

Please sign in to comment.