Skip to content

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

@richard-barella

Description

@richard-barella

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions