summaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/system.scm')
-rw-r--r--guix/scripts/system.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 430815902d..a6e717d52c 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -1328,9 +1328,17 @@ argument list and OPTS is the option alist."
(x (leave (G_ "wrong number of arguments~%"))))))
(list-generations pattern)))
((describe)
+ ;; Describe the running system, which is not necessarily the current
+ ;; generation. /run/current-system might point to
+ ;; /var/guix/profiles/system-N-link, or it might point directly to
+ ;; /gnu/store/…-system. Try both.
(match (generation-number "/run/current-system" %system-profile)
(0
- (leave (G_ "no system generation, nothing to describe~%")))
+ (match (generation-number %system-profile)
+ (0
+ (leave (G_ "no system generation, nothing to describe~%")))
+ (generation
+ (display-system-generation generation))))
(generation
(display-system-generation generation))))
((search)