Skip to content

Commit

Permalink
sudo -k before calling build scripts
Browse files Browse the repository at this point in the history
Potentially build scripts would call sudo, if so we don't want that to automatically succeed just because the time-period in which sudo works is still active after a previous incantation.

Closes Homebrew#10629.

In fact I don't see how this can have been the problem, but if this isn't the problem then I don't see what else can be the problem.
  • Loading branch information
mxcl authored and chrismetcalf committed Jun 18, 2012
1 parent 3a58520 commit 5c7777c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Library/Homebrew/build.rb
Expand Up @@ -27,6 +27,11 @@
# dev tools into /usr/bin as a default
ENV.prepend 'PATH', MacOS.dev_tools_path, ':' unless ORIGINAL_PATHS.include? MacOS.dev_tools_path

# Force any future invocations of sudo to require the user's password to be
# re-entered. This is in-case any build script call sudo. Certainly this is
# can be inconvenient for the user. But we need to be safe.
system "/usr/bin/sudo -k"

install(Formula.factory($0))
rescue Exception => e
if ENV['HOMEBREW_ERROR_PIPE']
Expand Down

0 comments on commit 5c7777c

Please sign in to comment.