PyFunceble/auto_save.py
def travis_permissions(cls):
        """
        Set permissions in order to avoid issues before commiting.
        """

        if PyFunceble.CONFIGURATION["travis"]:
            try:
                build_dir = PyFunceble.environ["TRAVIS_BUILD_DIR"]
                commands = [
                    "sudo chown -R travis:travis %s" % (build_dir),
                    "sudo chgrp -R travis %s" % (build_dir),
                    "sudo chmod -R g+rwX %s" % (build_dir),
                    "sudo chmod 777 -Rf %s.git"
                    % (build_dir + PyFunceble.directory_separator),
                    r"sudo find %s -type d -exec chmod g+x '{}' \;" % (build_dir),
                ]

                for command in commands:
                    Command(command).execute()

                if Command("git config core.sharedRepository").execute() == "":
                    Command("git config core.sharedRepository group").execute()
            except KeyError:
                pass
def travis_permissions(cls):
        """
        Set permissions in order to avoid issues before commiting.
        """

        if PyFunceble.CONFIGURATION["travis"]:
            try:
                build_dir = PyFunceble.environ["TRAVIS_BUILD_DIR"]
                commands = [
                    "sudo chown -R travis:travis %s" % (build_dir),
                    "sudo chgrp -R travis %s" % (build_dir),
                    "sudo chmod -R g+rwX %s" % (build_dir),
                    "sudo chmod 777 -Rf %s.git"
                    % (build_dir + PyFunceble.directory_separator),
                    r"sudo find %s -type d -exec chmod g+x '{}' \;" % (build_dir),
                ]

                for command in commands:
                    Command(command).execute()

                if Command("git config core.sharedRepository").execute() == "":
                    Command("git config core.sharedRepository group").execute()
            except KeyError:
                pass
Set permissions in order to avoid issues before commiting.