From d54b9d548fa8b1b702bbed73478f0948a2444ab4 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 29 Nov 2024 16:36:43 +0100 Subject: fix(modules/lf): Retry connecting to the server It is possible that the config file is sourced, without a started server. This is effectively a race condition, which can only be fixed upstream, but we can at least try to connect to the server again. --- modules/by-name/lf/lf/module.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/by-name/lf/lf/module.nix b/modules/by-name/lf/lf/module.nix index 44b7af0e..1c02092d 100644 --- a/modules/by-name/lf/lf/module.nix +++ b/modules/by-name/lf/lf/module.nix @@ -82,7 +82,11 @@ in { &{{ tmp="$(mktemp)" ${lib.getExe pkgs.lf-make-map} --depth 4 generate ~/media ~/repos ~/school >"$tmp" - lf -remote "send $id source $tmp" + + until lf -remote "send $id source $tmp"; do + sleep 0.2 + done + rm "$tmp" }} ''; -- cgit 1.4.1