summaryrefslogtreecommitdiff
path: root/guix/scripts/edit.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/edit.scm')
-rw-r--r--guix/scripts/edit.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm
index fa10a16f31..0509148c4d 100644
--- a/guix/scripts/edit.scm
+++ b/guix/scripts/edit.scm
@@ -79,5 +79,12 @@ line."
(leave (_ "source location of package '~a' is unknown~%")
(package-full-name package))))
packages)
- (apply execlp (%editor) (%editor)
- (append-map package->location-specification packages)))))
+
+ (catch 'system-error
+ (lambda ()
+ (apply execlp (%editor) (%editor)
+ (append-map package->location-specification packages)))
+ (lambda args
+ (let ((errno (system-error-errno args)))
+ (leave (_ "failed to launch '~a': ~a~%")
+ (%editor) (strerror errno))))))))