mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-17 16:38:12 -05:00
substitute: Check for --help or --version options early.
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 (guix-substitute): Earlier check for --help or --version. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
5bfb7ebe5d
commit
d4158ea63a
1 changed files with 8 additions and 4 deletions
|
@ -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))))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue