Skip to content

Commit 27d8d72

Browse files
machbuildsclaude
andcommitted
0.1.3: fix find_global trailing-colon (atom-setup install skip)
Surfaced by an isolated end-to-end install test of release/v0.2. The bash wrapper's `find_global()` rebuilds PATH like: PATH=$(echo "$PATH" | tr ':' '\n' | grep -v ^$ATOM_DIR$ | tr '\n' ':') The final `tr '\n' ':'` leaves a TRAILING COLON, which bash interprets as cwd. When the wrapper is run from inside the source dir, cwd contains a file named `atom-setup` (the wrapper itself), so `command -v atom-setup` returned `./atom-setup` and the install loop took the "already installed, skipping" path. Result: a true fresh install on a machine without atom-setup on PATH ended up with no global atom-setup, even though the wrapper appeared to succeed. `find_global()` now strips both empty PATH components and the trailing colon. All 5 CLIs install correctly in a scratch test. Existing 0.1.2 users in any working state are unaffected — the bug only bites a fresh `git clone + ./atom-setup` on a machine that doesn't already have `atom-setup` on PATH. Adds VERSION at the repo root. Plain text, forward-compatible with the `atom upgrade` verb landing in v0.2 (which polls this file on `main` to decide whether a new release is available). Versions bumped 0.1.2 → 0.1.3 across all 5 package.json + lockfiles. scripts/test-atom-setup.sh assertion updated. 57/57 still pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 1364699 commit 27d8d72

14 files changed

Lines changed: 41 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ All notable changes to atom land here. Format: [Keep a Changelog](https://keepac
66

77
Tracking work targeting v0.2. See `docs/planning/` for in-flight build plans.
88

9+
## [0.1.3] — 2026-05-07
10+
11+
Hotfix surfaced by an end-to-end isolated install test of `release/v0.2`. Existing 0.1.2 users in any working state are unaffected; the bug only bites a fresh `git clone + ./atom-setup` on a machine that doesn't already have `atom-setup` on PATH.
12+
13+
### Fixed
14+
15+
- **`./atom-setup` silently skipped installing `atom-setup` itself.** The bash wrapper's `find_global()` rebuilds PATH via `echo "$PATH" | tr ':' '\n' | grep -v ^$ATOM_DIR$ | tr '\n' ':'`. The final `tr` left a **trailing colon**, which bash interprets as cwd. When the wrapper is run from inside the source dir, cwd contains a file named `atom-setup` (the wrapper itself), so `command -v atom-setup` returned `./atom-setup` and the install loop took the "already installed, skipping" path. `find_global` now strips both empty PATH components and the trailing colon.
16+
17+
### Added
18+
19+
- **`VERSION`** at the repo root. Plain text, single line. Forward-compatible with the `atom upgrade` verb landing in v0.2 (the upgrade verb polls this file on `main` to decide whether a new release is available).
20+
921
## [0.1.2] — 2026-05-07
1022

1123
Patch release. Single fix to the install path so a fresh `git clone + ./atom-setup` actually works.
@@ -65,7 +77,8 @@ First feature-complete release. atom is a project-starter template with cross-pr
6577
- Stack presets currently include `nextjs` only. Other stacks fall back to the generic scaffold and will land per-stack in v0.2.
6678
- Constitution generation is a TODO marker in the cheatsheet; v0.2 will wire `speckit-constitution` automatically.
6779

68-
[Unreleased]: https://github.com/machbuilds/atom/compare/v0.1.2...HEAD
80+
[Unreleased]: https://github.com/machbuilds/atom/compare/v0.1.3...HEAD
81+
[0.1.3]: https://github.com/machbuilds/atom/releases/tag/v0.1.3
6982
[0.1.2]: https://github.com/machbuilds/atom/releases/tag/v0.1.2
7083
[0.1.1]: https://github.com/machbuilds/atom/releases/tag/v0.1.1
7184
[0.1.0]: https://github.com/machbuilds/atom/releases/tag/v0.1.0

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.3

atom-setup

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,18 @@ CLIS=(atom atom-setup nucleus learnings model-race)
4343
# Find the GLOBAL atom-setup (skip cwd in PATH so we don't recurse into
4444
# this script). Used both for "already installed?" detection and for the
4545
# final exec.
46+
#
47+
# Two failure modes the cleanup handles:
48+
# - $ATOM_DIR explicitly in PATH (filtered by `grep -v ^$ATOM_DIR$`)
49+
# - empty PATH components (which bash treats as cwd) introduced when
50+
# splitting/joining; if cwd happens to be $ATOM_DIR, that smuggles
51+
# `./atom-setup` (this script) in as a "global" hit. Strip both empty
52+
# lines and the trailing colon.
4653
find_global() {
4754
local name="$1"
48-
PATH=$(echo "$PATH" | tr ':' '\n' | grep -v "^$ATOM_DIR$" | tr '\n' ':') command -v "$name" 2>/dev/null
55+
local cleaned
56+
cleaned=$(echo "$PATH" | tr ':' '\n' | grep -v "^$ATOM_DIR$" | grep -v '^$' | tr '\n' ':' | sed 's/:$//')
57+
PATH="$cleaned" command -v "$name" 2>/dev/null
4958
}
5059

5160
# ─── install CLIs (only what's missing) ─────────────────────────────

bin/atom-setup/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/atom-setup/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@atom/atom-setup",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "Interactive wizard that transforms a cloned atom checkout into a personalized project.",
55
"type": "module",
66
"bin": {

bin/atom/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/atom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@atom/atom",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "Top-level help dispatcher for atom's tooling. Lists every CLI in one place.",
55
"type": "module",
66
"bin": {

bin/learnings/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/learnings/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@atom/learnings",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "Your local playbook of generalized patterns. Lives at ~/.atom/learnings, optionally synced to a private GitHub repo. Auto-copied into every new atom-bootstrapped project.",
55
"type": "module",
66
"bin": {

bin/model-race/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)