gitlab-group-clone
gitlab-group-clone copied to clipboard
Update is not working
OS: Ubuntu linux Python: 3.8
First call works: gitlab-clone --group_id <my-id> --token <my-token> --gitlab-url <my-url>
When I want to update the repo by the repeated call of the previous command it fails with error:
[Errno 2] No such file or directory: 'cd'
The issues are the lines https://github.com/LaserPhaser/gitlab-group-clone/blob/master/gitlab_clone/clonner.py#L52-L53
Popen
cannot execute shell internal cd <dir>
,
but the following construct which changes directory before the command execution can be used:
command = shlex.split(f"git pull")
result_code = subprocess.Popen(command, cwd=path)