summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/describe.scm15
-rw-r--r--guix/scripts/package.scm7
2 files changed, 9 insertions, 13 deletions
diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index 5e00067ef8..f13f221da9 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -201,11 +201,7 @@ way and displaying details about the channel's source code."
(format #t (G_ " commit: ~a~%")
(if (supports-hyperlinks?)
(channel-commit-hyperlink channel commit)
- commit))
- (when (not (supports-hyperlinks?))
- (format #t (G_ " URL: ~a~%")
- (channel-commit-hyperlink channel commit
- (lambda (url msg) url))))))
+ commit))))
(_ #f)))
;; Show most recently installed packages last.
@@ -237,12 +233,9 @@ way and displaying details about the channel's source code."
(define* (channel-commit-hyperlink channel
#:optional
- (commit (channel-commit channel))
- (transformer hyperlink))
+ (commit (channel-commit channel)))
"Return a hyperlink for COMMIT in CHANNEL, using COMMIT as the hyperlink's
-text. The hyperlink links to a web view of COMMIT, when available.
-TRANSFORMER is a procedure of 2 arguments, a URI and text, and returns a
-string for display."
+text. The hyperlink links to a web view of COMMIT, when available."
(let* ((url (channel-url channel))
(uri (string->uri url))
(host (and uri (uri-host uri))))
@@ -251,7 +244,7 @@ string for display."
(#f
commit)
((_ template)
- (transformer (template url commit) commit)))
+ (hyperlink (template url commit) commit)))
commit)))
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 1cb0d382bf..d2f4f1ccd3 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -81,12 +81,15 @@
"Ensure the default profile symlink and directory exist and are writable."
(ensure-profile-directory)
- ;; Create ~/.guix-profile if it doesn't exist yet.
+ ;; Try to create ~/.guix-profile if it doesn't exist yet.
(when (and %user-profile-directory
%current-profile
(not (false-if-exception
(lstat %user-profile-directory))))
- (symlink %current-profile %user-profile-directory)))
+ (catch 'system-error
+ (lambda ()
+ (symlink %current-profile %user-profile-directory))
+ (const #t))))
(define (delete-generations store profile generations)
"Delete GENERATIONS from PROFILE.