diff --git a/CHANGELOG.md b/CHANGELOG.md index 943ede2..3836965 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- Fixed log initialization order so the log directory is created before the first log message is written. +- Fixed first-run behavior for fresh repository clones by creating the `log/` directory before writing log output. + ## 1.0.0 - 2026-07-05 ### Added diff --git a/tr2gf.sh b/tr2gf.sh index 04de267..b3a8898 100755 --- a/tr2gf.sh +++ b/tr2gf.sh @@ -278,8 +278,11 @@ _vars_setup() { _set_var TR2GF_LOG_LEVEL 2 _set_var TR2GF_BATCH "" + _init_log + if [ -f "$TR2GF/vars" ]; then _load_vars_file "$TR2GF/vars" + _init_log _notice "Note: using tr2gf configuration from: $TR2GF/vars" _log "Loaded configuration from: $TR2GF/vars" 2 else