Passing branch to update_package()

Solves the problem where script dies when running it and having an existing 'repo' folder checked out.
This commit is contained in:
Markus Viitamäki 2021-11-17 11:23:36 +01:00
parent ed737e22ee
commit f725796ac2

View File

@ -414,7 +414,7 @@ def main():
if os.path.isdir('./repo'):
print(f"Package devicetype-library is already installed, "
+ f"updating {os.path.join(cwd, 'repo')}")
update_package('./repo')
update_package('./repo', branch=args.branch)
else:
repo = Repo.clone_from(args.url, os.path.join(cwd, 'repo'), branch=args.branch)
print(f"Package Installed {repo.remotes.origin.url}")