aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/lib
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-07 19:11:48 -0500
committerCraig Jennings <c@cjennings.net>2026-05-07 19:11:48 -0500
commit437678d7f728666733bcd91c0b21c1a45f665648 (patch)
tree694bd02e1640d693ce15b5d4e836d98c464dfc16 /scripts/testing/lib
parent64257ff711145b22812ae54df31d8b631c01e18e (diff)
downloadarchsetup-437678d7f728666733bcd91c0b21c1a45f665648.tar.gz
archsetup-437678d7f728666733bcd91c0b21c1a45f665648.zip
refactor(archsetup): break dotfile-restore chain into guarded steps
The previous block ran three operations under one error_warn: `cd "$dotfiles_dir" && git config --global --add safe.directory ... && git restore .`. If any one of them failed, the operator saw a single "restoring dotfile versions" warning with no clue which step broke. The cd was unnecessary because git's `-C` flag does the same thing without changing the calling shell's working directory. I split the block into two guarded steps. The `safe.directory` config runs first with its own error_warn. If that step succeeds, the `git restore` runs next with its own error_warn. If `safe.directory` fails, the dotfile restore is skipped entirely. The original cause gets logged once instead of cascading into a second error from git's dubious-ownership check. I also dropped the `cd` and used `git -C "$dotfiles_dir"` instead.
Diffstat (limited to 'scripts/testing/lib')
0 files changed, 0 insertions, 0 deletions