Changeset - 7c57f21b311b
[Not reviewed]
0 1 0
Lance Edgar (lance) - 7 years ago 2017-09-23 21:38:37
lance@edbob.org
Add `force_yes` param to `fablib.apt.install()`
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rattail/fablib/apt.py
Show inline comments
 
@@ -42,8 +42,9 @@ def install(*packages, **kwargs):
 
    frontend = kwargs.get('frontend', 'noninteractive')
 
    target = kwargs.get('target_release')
 
    target = '--target-release={}'.format(target) if target else ''
 
    sudo('DEBIAN_FRONTEND={} apt-get --assume-yes {} install {}'.format(
 
            frontend, target, ' '.join(packages)))
 
    force_yes = ' --force-yes' if kwargs.get('force_yes') else ''
 
    sudo('DEBIAN_FRONTEND={} apt-get --assume-yes {}{} install {}'.format(
 
            frontend, target, force_yes, ' '.join(packages)))
 

	
 

	
 
def purge(*packages):
0 comments (0 inline, 0 general)