aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-05-24 23:14:19 +0200
committerLudovic Courtès <ludo@gnu.org>2013-05-24 23:14:19 +0200
commitcba363bea8b93d367d0e64e94a8b31ef91707329 (patch)
treedb7e0b8a3456f21cbdaf0180c1636ef23df4ceb7
parent929c0f69de155a1ca41296515541ee51856bd2bb (diff)
downloadguix-cba363bea8b93d367d0e64e94a8b31ef91707329.tar
guix-cba363bea8b93d367d0e64e94a8b31ef91707329.tar.gz
package: Fix default profile ownership check when it's just been created.
* guix/scripts/package.scm (guix-package)[ensure-default-profile]: Check whether S is true before checking its owner. Fixes the case where we built %PROFILE-DIRECTORY just above.
-rw-r--r--guix/scripts/package.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index e68d0dd902..cd93cc3758 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -644,7 +644,7 @@ more information.~%"))
(rtfm))))
;; Bail out if it's not owned by the user.
- (unless (= (stat:uid s) (getuid))
+ (unless (or (not s) (= (stat:uid s) (getuid)))
(format (current-error-port)
(_ "error: directory `~a' is not owned by you~%")
%profile-directory)