diff --git a/rattail_fabric2/composer.py b/rattail_fabric2/composer.py index 98d12f6..9cf523e 100644 --- a/rattail_fabric2/composer.py +++ b/rattail_fabric2/composer.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2019 Lance Edgar +# Copyright © 2010-2022 Lance Edgar # # This file is part of Rattail. # @@ -24,14 +24,19 @@ Fabric lib for Composer (PHP dependency manager) """ -from __future__ import unicode_literals, absolute_import - -from rattail_fabric2 import make_deploy, exists +from rattail_fabric2 import apt, make_deploy, exists deploy = make_deploy(__file__) +def install(c, with_apt=True): + if with_apt: + apt.install(c, 'composer') + else: + install_globally(c) + + def install_globally(c): """ Install `composer.phar` in global location