Skip to content

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

Open
briandunn wants to merge 1 commit into
dkarter:masterfrom
briandunn:fix/arch-detection-on-debian
Open

fix(arch): use /etc/arch-release for distro detection instead of kernel version#413
briandunn wants to merge 1 commit 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

…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>
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