taskcat icon indicating copy to clipboard operation
taskcat copied to clipboard

Project path isn't recognized correctly if project name ends with 'ci'

Open sshvans opened this issue 7 years ago • 0 comments

Describe the bug When project name ends with ci, taskcat cannot recognize the project path correctly due to the way it's doing the split at line 52, bin/taskcat

To Reproduce Create a project with ci in the name, for example quickstart-myproject-ci. Put templates and taskcat.yml file at appropriate locations, and run taskcat.

To verify above behavior, I ran following commands on my local python and confirm the above issue:

$ "quickstart-taskcat-ci/ci/taskcat.yml".split('ci/')[0][:-1] 'quickstart-taskcat'

$ "quickstart-taskcat-ci/ci/taskcat.yml".split('ci/') ['quickstart-taskcat-', '', 'taskcat.yml']

You can see the project name above is quickstart-taskcat-ci and the result of the split is quickstart-taskcat instead of quickstart-taskcat-ci

If you run the above commands for any other project name, it gives the right project name on split. See below.

$ "quickstart-project/ci/taskcat.yml".split('ci/')[0][:-1] 'quickstart-project'

Fix I've PR coming in. Stay tuned.

sshvans avatar Jan 16 '19 21:01 sshvans