How to use the atelier.utils.confirm function in atelier

To help you get started, we’ve selected a few atelier examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lino-framework / lino / lino / management / commands / install.py View on Github external
def handle(self, *args, **options):
        reqs = set(settings.SITE.get_requirements())
        if len(reqs) == 0:
            print("No requirements")
        else:
            reqs = sorted(reqs)
            if options['list']:
                print('\n'.join(reqs))
                return
            cmd = "pip install --upgrade --trusted-host svn.forge.pallavi.be {}".format(' '.join(reqs))
            if not options['interactive'] or confirm("{} (y/n) ?".format(cmd)):
                runcmd(cmd)