Find root of repo that contains the actual script
This makes it possible to run the render script from anywhere and have it still function correctly.
This commit is contained in:
@@ -5,13 +5,14 @@
|
||||
import functools
|
||||
import json
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import git
|
||||
import requests
|
||||
import yaml
|
||||
from jinja2 import Environment, FileSystemLoader, StrictUndefined, Template
|
||||
|
||||
REPO = git.Repo(".", search_parent_directories=True)
|
||||
REPO = git.Repo(sys.path[0], search_parent_directories=True)
|
||||
assert REPO.working_dir is not None
|
||||
|
||||
ROOT = pathlib.Path(REPO.working_dir)
|
||||
|
||||
Reference in New Issue
Block a user