guix-package: Fix check for ~/.guix-profile existence.

* guix-package.in (guix-package): When testing whether
  %USER-ENVIRONMENT-DIRECTORY exists, use `lstat' instead of
  `file-exists?'.  Reported by Andreas Enge.
This commit is contained in:
Ludovic Courtès 2013-01-13 23:47:37 +01:00
parent 1ca982808a
commit ae9e328800
1 changed files with 2 additions and 1 deletions

View File

@ -462,7 +462,8 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
;; Create ~/.guix-profile if it doesn't exist yet.
(when (and %user-environment-directory
%current-profile
(not (file-exists? %user-environment-directory)))
(not (false-if-exception
(lstat %user-environment-directory))))
(symlink %current-profile %user-environment-directory))
(with-error-handling