mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 20:13:32 +01:00
fixup! build.cmds.CmdListRepos: Support local repos
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f6c3f49fca
commit
c37e180e00
2 changed files with 4 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re, git, os
|
||||
import re, os
|
||||
from argparse import Namespace, ArgumentParser
|
||||
|
||||
from ..Cmd import Cmd
|
||||
|
|
@ -79,11 +79,8 @@ class CmdListRepos(Cmd): # export
|
|||
out = []
|
||||
for entry in os.scandir(args.base_url + "/" + subdir):
|
||||
path = entry.path
|
||||
try:
|
||||
_ = git.Repo(path).git_dir
|
||||
except:
|
||||
continue
|
||||
out.append(path)
|
||||
if os.path.isdir(path + "/.git") or os.path.exists(path + "/HEAD"):
|
||||
out.append(path)
|
||||
if out:
|
||||
print('\n'.join(out))
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue