From 72737581f7bbe22dd29aa1bac68c0a51ee0f6d49 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Sat, 23 May 2026 12:19:10 +0000 Subject: [PATCH] fix(install): ensure config.toml is created if it doesn't exist or is empty --- registry/coder-labs/modules/codex/scripts/install.sh.tftpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/registry/coder-labs/modules/codex/scripts/install.sh.tftpl b/registry/coder-labs/modules/codex/scripts/install.sh.tftpl index c7b4e954..039bcdcf 100644 --- a/registry/coder-labs/modules/codex/scripts/install.sh.tftpl +++ b/registry/coder-labs/modules/codex/scripts/install.sh.tftpl @@ -173,8 +173,9 @@ function write_minimal_default_config() { function populate_config_toml() { local config_path="$HOME/.codex/config.toml" mkdir -p "$(dirname "$${config_path}")" + touch "$${config_path}" - if [ ! -f "$${config_path}" ]; then + if [ ! -s "$${config_path}" ]; then printf "Using minimal default configuration\n" write_minimal_default_config "$${config_path}" fi