From de8fac24a3176f089dd59a8bc942f97dbe6a833a Mon Sep 17 00:00:00 2001 From: shankar0123 Date: Wed, 13 May 2026 04:09:39 +0000 Subject: [PATCH] docs(readme): fix quickstart $EDITOR portability bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The production-path quickstart at README.md:103-108 used `$EDITOR deploy/.env` literally — assumes the operator has $EDITOR exported in their shell. On a fresh macOS / zsh session (default install, nothing in .zshrc), $EDITOR is unset and the shell expands the command to ` deploy/.env` with a leading empty arg, which zsh tries to execute as a binary: shankar@macbookpro certctl % $EDITOR deploy/.env zsh: permission denied: deploy/.env The escalation reflex makes it worse — `sudo $EDITOR deploy/.env` expands to `sudo deploy/.env` (sudo strips env by default), which sudo dispatches as a command lookup against PATH: sudo: deploy/.env: command not found Net: a new-user quickstart that fails on the second command of the production path with two opaque errors back-to-back. Replace with the POSIX-portable default-fallback form: "${EDITOR:-nano}" deploy/.env `nano` is pre-installed on macOS (BSD nano) and every mainstream Linux distro, so the fallback always resolves. The user's preferred editor (vim/emacs/code) is still honored if they have $EDITOR set. Added a parenthetical reminder so the operator who has a strong editor preference knows they can substitute. Verified no other phantom-EDITOR sites in README / docs/getting-started / docs/operator via: grep -nE '\$EDITOR\b' README.md docs/getting-started/*.md docs/operator/*.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 647ee35..c95ec89 100644 --- a/README.md +++ b/README.md @@ -101,9 +101,10 @@ Wait ~30 seconds, then open **https://localhost:8443** in your browser. The demo ```bash cp .env.example deploy/.env # or root .env if running outside compose -$EDITOR deploy/.env # set POSTGRES_PASSWORD, CERTCTL_AUTH_SECRET, +"${EDITOR:-nano}" deploy/.env # set POSTGRES_PASSWORD, CERTCTL_AUTH_SECRET, # CERTCTL_API_KEY, CERTCTL_CONFIG_ENCRYPTION_KEY, # CERTCTL_AGENT_ID — all via openssl rand + # (replace nano with your preferred editor) docker compose -f deploy/docker-compose.yml up -d --build ```