* [bug#55577] [PATCH] Check substitute --help or --version options early
@ 2022-05-22 13:54 yarl-baudig
2022-05-27 21:36 ` bug#55577: " Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: yarl-baudig @ 2022-05-22 13:54 UTC (permalink / raw)
To: 55577
Running `guix archive --authorize` sets /etc/guix/acl to 600
via with-atomic-file-output via mkstemp!.
Then running `guix substitute --help/--version` fails on "permission denied".
While "guix substitute" is an internal tool, the options --help and --version
exist and you should be able to run those from the command line.
* guix/scripts/substitute.scm: earlier check for --help or --version.
---
guix/scripts/substitute.scm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 908a8334a8..c5f5d23b47 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -704,6 +704,14 @@ (define-command (guix-substitute . args)
(category internal)
(synopsis "implement the build daemon's substituter protocol")
+ (match args
+ ((or ("-V") ("--version"))
+ (show-version-and-exit "guix substitute"))
+ ((or ("-h") ("--help") ())
+ (show-help)
+ (exit 0))
+ (_ #t))
+
(define print-build-trace?
(match (or (find-daemon-option "untrusted-print-extended-build-trace")
(find-daemon-option "print-extended-build-trace"))
@@ -775,10 +783,6 @@ (define reply-port
#:print-build-trace?
print-build-trace?)
(loop))))))
- ((or ("-V") ("--version"))
- (show-version-and-exit "guix substitute"))
- ((or ("-h") ("--help"))
- (show-help))
(opts
(leave (G_ "~a: unrecognized options~%") opts))))))
--
2.36.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#55577: [PATCH] Check substitute --help or --version options early
2022-05-22 13:54 [bug#55577] [PATCH] Check substitute --help or --version options early yarl-baudig
@ 2022-05-27 21:36 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2022-05-27 21:36 UTC (permalink / raw)
To: yarl-baudig; +Cc: 55577-done
Hi,
yarl-baudig@mailoo.org skribis:
> Running `guix archive --authorize` sets /etc/guix/acl to 600
> via with-atomic-file-output via mkstemp!.
> Then running `guix substitute --help/--version` fails on "permission denied".
> While "guix substitute" is an internal tool, the options --help and --version
> exist and you should be able to run those from the command line.
>
> * guix/scripts/substitute.scm: earlier check for --help or --version.
Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-27 21:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-22 13:54 [bug#55577] [PATCH] Check substitute --help or --version options early yarl-baudig
2022-05-27 21:36 ` bug#55577: " Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.