Skip to content

Commit 473718d

Browse files
committed
Catch github url special case
When using github urls, the code tries to test the detected name against the previously provided name. If we didn't provide a name, though, this would throw an exception.
1 parent e4719d0 commit 473718d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autospec/tarball.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def name_and_version(name_arg, version_arg, filemanager):
380380
m = re.search(pattern, url)
381381
if m:
382382
repo = m.group(2).strip()
383-
if repo not in name:
383+
if not name or repo not in name:
384384
# Only take the repo name as the package name if it's more descriptive
385385
name = repo
386386
elif name != repo:

0 commit comments

Comments
 (0)