Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git plugin fails to clone repo URLs with trailing / #923

Open
ribab opened this issue Oct 21, 2021 · 3 comments
Open

Git plugin fails to clone repo URLs with trailing / #923

ribab opened this issue Oct 21, 2021 · 3 comments

Comments

@ribab
Copy link
Contributor

ribab commented Oct 21, 2021

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.

@hppritcha
Copy link
Member

@ribab are you going to open a pr to fix this?

@hppritcha
Copy link
Member

@ribab did PR #922 fix this issue?

@ribab
Copy link
Contributor Author

ribab commented Nov 12, 2021

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants