aboutsummaryrefslogtreecommitdiff
path: root/scripts
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
commitf490f4afee16a5137378c1a3e2c052311ad47f46 (patch)
tree5fc429ea04a0d89f273c017cbedf0015b28e63b0 /scripts
parentc69ad4399c0d61418ace1863d2240c1e0400ee61 (diff)
downloadarchsetup-f490f4afee16a5137378c1a3e2c052311ad47f46.tar.gz
archsetup-f490f4afee16a5137378c1a3e2c052311ad47f46.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')
0 files changed, 0 insertions, 0 deletions