CmdAuthInfo: Fix no output

jw-pkg.py projects get-auth-info doesn't print anything, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-17 18:01:57 +01:00
commit d7f9fc7260

View file

@ -35,14 +35,14 @@ class CmdGetAuthInfo(Cmd): # export
if re.match(r'^\s*$', line):
continue
name, url, typ = re.split(r'\s+', line)
if name == 'origin' and typ == '(pull)': # TODO: Use other remotes, too?
if name == 'origin' and typ in ['(pull)', '(fetch)']: # TODO: Use other remotes, too?
parsed = urlparse(url)
for key in keys:
result[key] = getattr(parsed, key)
base = parsed.geturl()
base = re.sub(r'/jw-pkg', '', base)
base = re.sub(r'/proj$', '', base)
url['remote-base'] = base
result['remote_base'] = base
break
# --- Print results