Skip to content

Commit

Permalink
Fix errors regarding ownership of repo. (Taken from project-chip#18302)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpagravel committed Jun 25, 2022
1 parent 71892c1 commit 23e8304
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/checkout_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def checkout_modules(modules: list, shallow: bool) -> None:
names = ', '.join(names)
logging.info(f'Checking out: {names}')

# ensure no errors regarding ownership in the directory. Newer GIT seems to
# require this:
subprocess.check_call(['git', 'config', '--global', '--add', 'safe.directory', CHIP_ROOT])

cmd = ['git', '-C', CHIP_ROOT, 'submodule', 'update', '--init']
cmd += ['--depth', '1'] if shallow else []
cmd += [module.path for module in modules]
Expand Down

0 comments on commit 23e8304

Please sign in to comment.