Radish alpha
r
rad:z371PVmDHdjJucejRoRYJcDEvD5pp
Radicle website including documentation and guides
Radicle
Git
install: Clear refs DB on upgrade
Alexis Sellier committed 2 years ago
commit 0b610c21a284a2699bdcf02dbfb2b1b3b4022d65
parent 48de0e3
1 file changed +8 -1
modified install
@@ -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