gh: only run migration when required
This commit is contained in:
parent
7403ed4980
commit
0912d26b30
|
@ -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