fix: ensure_file_exists returns 0 when file exists

This commit is contained in:
Yury Kossakovsky
2025-12-12 10:02:54 -07:00
parent e0018f2b2d
commit 7645c02562

View File

@@ -192,7 +192,9 @@ require_file() {
# Usage: ensure_file_exists "/path/to/file"
ensure_file_exists() {
local file="$1"
[[ ! -f "$file" ]] && touch "$file"
if [[ ! -f "$file" ]]; then
touch "$file"
fi
}
#=============================================================================