Skip to content

Commit d8e47cc

Browse files
committed
Resolve input csv path to project root
1 parent 31fa834 commit d8e47cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ def main():
2828
input_config = config.get("input", {})
2929
if input_config.get("mode") == "csv":
3030
csv_path = input_config["csv"]["path"]
31+
# If the path is not absolute, resolve it relative to the root directory
3132
if not os.path.isabs(csv_path):
32-
csv_path = os.path.join(os.getcwd(), csv_path)
33+
csv_path = os.path.join(root_dir, csv_path)
3334
input_config["csv"]["path"] = csv_path
3435
note_texts = load_notes(input_config) # This loads the notes based on config (CSV mode)
3536

0 commit comments

Comments
 (0)