Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

When APT is selected, update its repositories to ensure up-to-date lo…

…cations
  • Loading branch information...
commit c1bf23bf40b5cd63930f0c4da7ee83a1bf343bb1 1 parent 02ca254
Yurii Rashkovskii authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 apps/htoad/src/htoad_pkg_apt.erl
View
8 apps/htoad/src/htoad_pkg_apt.erl
@@ -11,8 +11,12 @@ init(Engine, #init{}, {operating_system_name, linux}, {linux_distribution, "Debi
initialize(Engine).
initialize(Engine) ->
- lager:debug("APT has been selected as a package manager"),
- htoad:assert(Engine, {package_manager, apt}).
+ lager:debug("APT has been selected as a package manager"),
+ lager:info("Updating apt repositories"),
+ Command = #shell{ cmd = "apt-get -y update", run_as = superuser },
+ htoad:assert(Engine,
+ [Command,
+ htoad_utils:on({exit_status, Command, 0}, {package_manager, apt})]).
-define(APT_SHELL_CHECK(Package),
case Package of
Please sign in to comment.
Something went wrong with that request. Please try again.