mtt
mtt copied to clipboard
Git plugin fails to clone repo URLs with trailing /
trafficstars
When a repo URL ends in / MTT thinks the name of this repo is an empty string and fails to chdir into it.
This is the error:
=======================================
Exception was raised: <class 'FileNotFoundError'> [Errno 2] No such file or directory: ''
=======================================
Traceback (most recent call last):
File "/opt/mtt/pylib/Tools/Executor/sequential.py", line 284, in execute_sections
plugin.execute(stageLog, keyvals, testDef)
File "/opt/mtt/pylib/Tools/Fetch/Git.py", line 456, in execute
os.chdir(repo)
FileNotFoundError: [Errno 2] No such file or directory: ''
The fix might be to filter out the trailing slash before computing the name of the repo.
@ribab are you going to open a pr to fix this?
@ribab did PR #922 fix this issue?
@hppritcha no it doesn't fix that issue. The workaround is to just not have a trailing slash in the ini file. I think this would be easy to fix though