How to use the gitman.shell.call function in gitman

To help you get started, we’ve selected a few gitman 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 jacebrowning / gitman / gitman / git.py View on Github external
def git(*args, **kwargs):
    return call('git', *args, **kwargs)
github jacebrowning / gitman / gitman / models / source.py View on Github external
# Enter the working tree
        shell.cd(self.name)
        if not git.valid():
            raise self._invalid_repository

        # Check for scripts
        if not self.scripts:
            common.show("(no scripts to run)", color='shell_info')
            common.newline()
            return

        # Run all scripts
        for script in self.scripts:
            try:
                lines = shell.call(script, _shell=True)
            except exceptions.ShellError as exc:
                common.show(*exc.output, color='shell_error')
                cmd = exc.program
                if force:
                    log.debug("Ignored error from call to '%s'", cmd)
                else:
                    msg = "Command '{}' failed in {}".format(cmd, os.getcwd())
                    raise exceptions.ScriptFailure(msg)
            else:
                common.show(*lines, color='shell_output')
        common.newline()
github jacebrowning / gitman / gitman / git.py View on Github external
def gitsvn(*args, **kwargs):
    return call('git', 'svn', *args, **kwargs)