mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 08:09:45 +01:00
gh: only run migration when required
This commit is contained in:
parent
7403ed4980
commit
0912d26b30
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ in {
|
|||
home.activation.migrateGhAccounts =
|
||||
let ghHosts = "${config.xdg.configHome}/gh/hosts.yml";
|
||||
in hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] ''
|
||||
if [[ ! -L "${ghHosts}" && -f "${ghHosts}" ]]; then
|
||||
if [[ ! -L "${ghHosts}" && -f "${ghHosts}" && $(grep --invert-match --quiet '^version:' ${ghHosts}) ]]; then
|
||||
(
|
||||
TMP_DIR=$(mktemp -d)
|
||||
trap "rm --force --recursive $TMP_DIR" EXIT
|
||||
|
|
Loading…
Reference in a new issue