Merge pull request #8 from dougt/use_chdir_not_cd

update_repo must use os.chdir().  calling os.system(cd
This commit is contained in:
Chris Lockfort 2013-08-19 05:11:16 -07:00
commit 458aa46501

View file

@ -71,7 +71,8 @@ def clone_repo(repo, dir, args):
def update_repo(repo, dir, args):
os.system("cd %s"%(dir,))
savedPath = os.getcwd()
os.chdir(dir)
# GitHub => Local
if args.mirror:
@ -80,6 +81,7 @@ def update_repo(repo, dir, args):
else:
os.system("git pull %s"%(args.git,))
os.chdir(savedPath)
if __name__ == "__main__":
main()