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

Wrong title when Licence file is not in root folder #29

Open
orschaef opened this issue Apr 24, 2019 · 1 comment
Open

Wrong title when Licence file is not in root folder #29

orschaef opened this issue Apr 24, 2019 · 1 comment

Comments

@orschaef
Copy link

When the licence file of the pod is in a directory that is not named after the pod (e.g. not in the root, instead in a subfolder called "foo") you get the wrong title (in this case: "foo").
The actual line of code can be found in credits.py:

title = path.split("/")[-2]

This just takes the parent of the licence file as title.

Example pod where it fails:

  • App Center

Expected Behavior: Title should be "AppCenter"

Actual Behavior: Title is "iOS" (because the parent folder of Licence file is "iOS")

@VirtualFox0
Copy link

A quick solution can be:

title = re.sub('^.*\/Pods\/', '', path).split("/")[0] 
# use the directory name of the installed pod (subfolders doesn't matter)

But with this solution only LICENSE files for Pods will work...

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