From 121b35849c69ea6aec8a9bd231bc740b9a678bce Mon Sep 17 00:00:00 2001 From: Jerome Lacoste Date: Mon, 23 Apr 2018 15:57:05 +0200 Subject: [PATCH] u3d/internals: grant_admin wasn't using has_admin_privileges? to get the privileges on non windows platforms --- lib/u3d_core/command_executor.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/u3d_core/command_executor.rb b/lib/u3d_core/command_executor.rb index a8a5654a..9406294d 100644 --- a/lib/u3d_core/command_executor.rb +++ b/lib/u3d_core/command_executor.rb @@ -144,6 +144,7 @@ def grant_admin_privileges(command) if Helper.windows? raise CredentialsError, "The command \'#{command}\' must be run in administrative shell" unless has_admin_privileges? else + raise CredentialsError, "The command \'#{command}\' must be run with admin privileges" unless has_admin_privileges? command = "sudo -k && echo #{cred.password.shellescape} | sudo -S bash -c \"#{command}\"" end UI.verbose 'Admin privileges granted for command execution'