aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-01-31 19:32:00 +0100
committerGitHub2017-01-31 19:32:00 +0100
commitb6f3399cb3facababf4f6b1e6f7821edc2db554a (patch)
tree0b059a865ee43b7ce9fd69936aa9c95099a416d8
parent664d0c67d5947605c914c4c56ebcfaa80cb6eca0 (diff)
parentc0b84a0479562edd0bb56b3d915fda9f90a520da (diff)
downloadbrew-b6f3399cb3facababf4f6b1e6f7821edc2db554a.tar.bz2
Merge pull request #1930 from vitorgalvao/set-permissions-sudo
cask: staged: no sudo in set_permissions
-rw-r--r--Library/Homebrew/cask/lib/hbc/staged.rb2
-rw-r--r--Library/Homebrew/cask/test/support/shared_examples/staged.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/staged.rb b/Library/Homebrew/cask/lib/hbc/staged.rb
index dcc05ef5d..c1aa01b29 100644
--- a/Library/Homebrew/cask/lib/hbc/staged.rb
+++ b/Library/Homebrew/cask/lib/hbc/staged.rb
@@ -27,7 +27,7 @@ module Hbc
full_paths = remove_nonexistent(paths)
return if full_paths.empty?
@command.run!("/bin/chmod", args: ["-R", "--", permissions_str] + full_paths,
- sudo: true)
+ sudo: false)
end
def set_ownership(paths, user: current_user, group: "staff")
diff --git a/Library/Homebrew/cask/test/support/shared_examples/staged.rb b/Library/Homebrew/cask/test/support/shared_examples/staged.rb
index ef4ff0341..95e75726e 100644
--- a/Library/Homebrew/cask/test/support/shared_examples/staged.rb
+++ b/Library/Homebrew/cask/test/support/shared_examples/staged.rb
@@ -47,7 +47,7 @@ shared_examples_for Hbc::Staged do
staged.stubs(Pathname: fake_pathname)
Hbc::FakeSystemCommand.expects_command(
- ["/usr/bin/sudo", "-E", "--", "/bin/chmod", "-R", "--", "777", fake_pathname]
+ ["/bin/chmod", "-R", "--", "777", fake_pathname]
)
staged.set_permissions(fake_pathname.to_s, "777")
end
@@ -57,7 +57,7 @@ shared_examples_for Hbc::Staged do
staged.stubs(:Pathname).returns(fake_pathname)
Hbc::FakeSystemCommand.expects_command(
- ["/usr/bin/sudo", "-E", "--", "/bin/chmod", "-R", "--", "777", fake_pathname, fake_pathname]
+ ["/bin/chmod", "-R", "--", "777", fake_pathname, fake_pathname]
)
staged.set_permissions([fake_pathname.to_s, fake_pathname.to_s], "777")
end