mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 21:29:48 +01:00
gh: test for existence of hosts file
Having the module enabled but never using gh will result in the config file existing but no hosts.yml. In that scenario we won't have anything to migrate, so only test for hosts.yml.
This commit is contained in:
parent
6ea6f0fbbb
commit
d5f201ca6c
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ in {
|
|||
# See https://github.com/nix-community/home-manager/issues/4744 for details.
|
||||
home.activation.migrateGhAccounts =
|
||||
hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] ''
|
||||
if [[ -e "${config.xdg.configHome}/gh/config.yml" ]]; then
|
||||
if [[ -e "${config.xdg.configHome}/gh/hosts.yml" ]]; then
|
||||
(
|
||||
TMP_DIR=$(mktemp -d)
|
||||
trap "rm --force --recursive $TMP_DIR" EXIT
|
||||
|
|
Loading…
Reference in a new issue