diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-05-28 15:41:32 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-05-28 23:04:43 +0200 |
commit | f8c4437f0f60f24031170b16482b1d4fc4632918 (patch) | |
tree | 5e7a1584b919ddb2efec7c47bbf9845fbca1d092 | |
parent | b1ae0f30d856503fa311d380584a6d7c80559332 (diff) | |
download | guix-f8c4437f0f60f24031170b16482b1d4fc4632918.tar.gz |
guix package: Do not warn about "missing arguments" when there's nothing to do.
In some cases, running "guix upgrade" can trigger this warning, and "missing arguments" is misleading then. Reported by flatwhatson on #guix. * guix/scripts/package.scm (process-actions): Change warning to "nothing to do".
-rw-r--r-- | guix/scripts/package.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 52e9961a42..6db83807af 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -1045,7 +1045,12 @@ processed, #f otherwise." (warn-about-old-distro) (when (and (null? files) (manifest-transaction-null? trans)) - (warning (G_ "missing arguments, nothing to do~%"))) + ;; We can reach this point because the user did not specify any action + ;; (as in "guix package"), did not specify any package (as in "guix + ;; install"), or because there's nothing to upgrade (as when running + ;; "guix upgrade" on an up-to-date profile). We cannot distinguish + ;; among these here; all we can say is that there's nothing to do. + (warning (G_ "nothing to do~%"))) (unless (manifest-transaction-null? trans) ;; When '--manifest' is used, display information about TRANS as if we |