Skip to content

Update is not working #3

@0ri0nX

Description

@0ri0nX

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions