install: Clear refs DB on upgrade

This commit is contained in:
Alexis Sellier
2024-04-06 18:23:49 +02:00
parent 48de0e3ee7
commit 0b610c21a2
+8 -1
View File
@@ -115,11 +115,18 @@ in_path() {
return 1 # The path is not in $PATH
}
upgrade() {
# Clear refs DB so that it can be re-populated on node start.
rad node db exec "DELETE FROM refs;" || echo "Refs database was not cleared."
}
get_started() {
printf "\n"
success
if ! is_authed; then
if is_authed; then
upgrade
else
printf "\n"
printf "Get started by creating your Radicle key pair with \033[35m\`rad auth\`\033[0m.\n"
fi