obsidian: add jq empty config file coalesce
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
parent
1012b2d005
commit
ef5da06269
1 changed files with 1 additions and 1 deletions
|
|
@ -570,7 +570,7 @@ in
|
|||
if [ -f "$OBSIDIAN_CONFIG" ]; then
|
||||
verboseEcho "Merging existing Obsidian config with generated template"
|
||||
tmp="$(mktemp)"
|
||||
run ${lib.getExe pkgs.jq} -s '.[0] * .[1]' "$OBSIDIAN_CONFIG" "${template}" > "$tmp"
|
||||
run ${lib.getExe pkgs.jq} -s '(.[0] // {}) * (.[1] // {})' "$OBSIDIAN_CONFIG" "${template}" > "$tmp"
|
||||
run install -m644 "$tmp" "$OBSIDIAN_CONFIG"
|
||||
rm -f "$tmp"
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue