guix: home: Delete existing symlink before re-linking it.

Julien LepillerSat Jul 25 23:31:26+0200 2020

4ba3ac3

guix: home: Delete existing symlink before re-linking it. * guix/scripts/home.scm (ensure-home-profile): Delete existing symlink before re-linking it.

guix/scripts/home.scm

164164
    (let ((home (false-if-exception (lstat %home))))
165165
      (cond
166166
        ((equal? (stat:type home) 'symlink)
167+
         (delete-file %home)
167168
         (symlink %current-home %home))
168169
        ((false-if-exception (lstat data-directory))
169170
         (leave (G_ "Your $HOME directory (~a) is not a symlink to the home