mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 03:09:47 +01:00
bat: handle existing cache in activation script
Run `bat cache --build` in an empty directory to work around failure when ~/cache exists.
This commit is contained in:
parent
0c88f782a1
commit
29a940d8c2
1 changed files with 4 additions and 0 deletions
|
@ -159,10 +159,14 @@ in {
|
|||
};
|
||||
})));
|
||||
|
||||
# NOTE: run `bat cache --build` in an empty directory to work
|
||||
# around failure when ~/cache exists
|
||||
# https://github.com/sharkdp/bat/issues/1726
|
||||
home.activation.batCache = hm.dag.entryAfter [ "linkGeneration" ] ''
|
||||
(
|
||||
export XDG_CACHE_HOME=${escapeShellArg config.xdg.cacheHome}
|
||||
verboseEcho "Rebuilding bat theme cache"
|
||||
cd "${pkgs.emptyDirectory}"
|
||||
run ${lib.getExe package} cache --build
|
||||
)
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue