Skip to content

fix(arch): use /etc/arch-release for distro detection instead of kernel version#413

Closed
briandunn wants to merge 4 commits into
dkarter:masterfrom
briandunn:fix/arch-detection-on-debian
Closed

fix(arch): use /etc/arch-release for distro detection instead of kernel version#413
briandunn wants to merge 4 commits into
dkarter:masterfrom
briandunn:fix/arch-detection-on-debian

Conversation

@briandunn
Copy link
Copy Markdown
Contributor

@briandunn briandunn commented May 22, 2026

Setup was crashing because it thought my ubuntu box should have the pacman binary. 🤷
LMK if you don't want the dprint change I'lll pull it out. not sure I'm clauding as intended in this repo.

Summary

  • The arch:sync task was running on Debian/Ubuntu because Task's if: field on a task reference doesn't reliably gate execution
  • Replaced the fragile uname -r | grep -q arch1 kernel-version heuristic with a check for /etc/arch-release, which is the standard file Arch Linux always provides and Debian/Ubuntu never will
  • Mirrors the same shell-if-in-cmd: pattern already used by debian:sync
  • Also excludes .claude/settings.local.json from dprint formatting checks (it's gitignored and modified at runtime by the Claude Code harness, causing pre-commit hook failures)

Test plan

  • Run setup.sh on a Debian/Ubuntu system — arch:sync should complete silently without attempting to invoke pacman
  • Run setup.sh on an Arch Linux system — pacman and yay installs should still execute as before

🤖 Generated with Claude Code

briandunn and others added 2 commits May 22, 2026 22:11
…el version

The Task `if:` field on a task reference doesn't reliably gate execution,
causing arch tools to run on Debian/Ubuntu. Mirrors the pattern already used
in debian:sync and checks /etc/arch-release (standard Arch file) instead of
the fragile `uname -r | grep -q arch1` heuristic.

Also excludes .claude/settings.local.json from dprint checks since it is
gitignored and modified at runtime by the Claude Code harness.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bat was only listed in the Arch pacman package list, leaving it absent on
Debian/Ubuntu. The bat:sync task (bat cache --build) runs unconditionally
and fails with "executable file not found" on any non-Arch Linux install.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@briandunn briandunn marked this pull request as draft May 25, 2026 17:50
briandunn and others added 2 commits May 25, 2026 17:50
Task subshells don't have mise shims in PATH, so bat installed by mise is
invisible to a bare bat invocation. Using mise exec -- mirrors the pattern
already used in the mise:tools:install task for other mise-managed tools.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The mise aqua backend downloads a bat binary that fails to execute on this
system (ELF interpreter mismatch). bat is now installed by the platform
package manager: apt on Debian/Ubuntu, Homebrew on macOS. bat was already
in the Arch pacman list. Reverts the mise exec workaround in bat:sync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@briandunn briandunn closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant