Commit 5e6cf14f authored by Benjamin Winger's avatar Benjamin Winger

Made inquisitor add repo to the known repos if it is not already in the list

parent fd5aaba6
......@@ -39,6 +39,7 @@ if __name__ == "__main__":
from portmod.repo.metadata import get_categories, get_repo_root, license_exists
import portmod.log as log
from portmod.repo.list import read_list
import portmod.repos as repos
repo_root = get_repo_root(os.getcwd())
......@@ -55,6 +56,16 @@ if __name__ == "__main__":
"Please run from within the repository you wish to inspect"
)
# Register repo in case it's not already in repos.cfg
REAL_ROOT = os.path.realpath(repo_root)
if not any([REAL_ROOT == os.path.realpath(repo.location) for repo in repos.REPOS]):
sys.path.append(os.path.join(repo_root, "pyclass"))
repos.REPOS.append(
repos.Repo(
os.path.basename(repo_root), repo_root, False, None, None, ["openmw"], 0
)
)
if args.debug:
portmod.globals.DEBUG = True
if args.mode is None or args.mode == "scan":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment