Repository: Canop/broot (language: rust)

Issue:
broot --install followed by br asks to install again
My `.zshrc` (on Mac) starts with:

```sh
[[ ! -e $XDG_CONFIG_HOME/broot/launcher/bash/br ]] && broot --install
source "$XDG_CONFIG_HOME/broot/launcher/bash/br"
```

But the first time I run `br` it asks:

```
Broot should be launched using a shell function.
This function most notably makes it possible to cd from inside broot
(see https://dystroy.org/broot/install-br/ for explanations).

Can I install it now? [Y/n]
```

The cause appears to be the implementation checking for `$XDG_CONFIG_HOME/broot/launcher/installed-vX` but `broot --install` doesn't include it.


Discussion / hints:

Fix patch:
diff --git a/src/shell_install/mod.rs b/src/shell_install/mod.rs
index 8b391435..c68ae58a 100644
--- a/src/shell_install/mod.rs
+++ b/src/shell_install/mod.rs
@@ -127,11 +127,11 @@ impl ShellInstall {
                     }
                 }
             }
-            // even if the installation isn't really complete (for example
-            // when no bash file was found), we don't want to ask the user
-            // again, we'll assume it's done
-            ShellInstallState::UpToDate.write(self)?;
         }
+        // even if the installation isn't really complete (for example
+        // when no bash file was found), we don't want to ask the user
+        // again, we'll assume it's done
+        ShellInstallState::UpToDate.write(self)?;
         debug!("Starting install");
         bash::install(self)?;
         fish::install(self)?;


Test patch: