Permalink
Browse files

Make apt-get install use run_as = superuser to ensure apt-get can get…

… its work done
  • Loading branch information...
Yurii Rashkovskii authored and DeadZen committed Feb 5, 2012
1 parent b072e50 commit 1c53b4310d046cbf9ad75c888c74aefed5f01446
Showing with 4 additions and 2 deletions.
  1. +4 −2 apps/htoad/src/htoad_pkg_apt.erl
@@ -26,10 +26,12 @@ initialize(Engine) ->
case Package of
#package{ name = Name, version = undefined } ->
#shell{ cmd = "(apt-get -y install " ++ Name ++ " && printf installed) "
- "|| printf not_installed" };
+ "|| printf not_installed",
+ run_as = superuser };
#package{ name = Name, version = Version } ->
#shell{ cmd = "(apt-get -y install " ++ Name ++ " =" ++ Version ++ " && printf installed) "
- "|| printf not_installed" }
+ "|| printf not_installed",
+ run_as = superuser }
end).
ensure_package(Engine, #package{ ensure = present } = Package, {package_manager, apt}) ->

0 comments on commit 1c53b43

Please sign in to comment.