Skip to content

Commit 6eb5732

Browse files
authored
Merge pull request #301 from lacostej/grant_admin
u3d/internals: grant_admin wasn't using has_admin_privileges? to get the privileges on non windows platforms
2 parents 60a2634 + 121b358 commit 6eb5732

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/u3d_core/command_executor.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def grant_admin_privileges(command)
144144
if Helper.windows?
145145
raise CredentialsError, "The command \'#{command}\' must be run in administrative shell" unless has_admin_privileges?
146146
else
147+
raise CredentialsError, "The command \'#{command}\' must be run with admin privileges" unless has_admin_privileges?
147148
command = "sudo -k && echo #{cred.password.shellescape} | sudo -S bash -c \"#{command}\""
148149
end
149150
UI.verbose 'Admin privileges granted for command execution'

0 commit comments

Comments
 (0)