Skip to content

Commit 8373740

Browse files
committed
fix template path
1 parent 80f3c9a commit 8373740

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/templater.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
import os
12
import tomllib
23
import argparse
34
from typing import Any
45

6+
script_dir = os.path.dirname(os.path.abspath(__file__))
7+
repo_dir = os.path.dirname(script_dir)
8+
template_path = os.path.join(repo_dir, 'recipes', 'recipe.tmpl')
59

610
def build_dependency_list(dependencies: dict[str, str]) -> list[str]:
711
deps: list[str] = []
@@ -37,7 +41,7 @@ def main():
3741
config = tomllib.load(f)
3842

3943
recipe: str
40-
with open('recipes/template.tmpl', 'r') as f:
44+
with open(template_path, 'r') as f:
4145
recipe = f.read()
4246

4347
# Replace the placeholders in the recipe with the project configuration.

0 commit comments

Comments
 (0)