GNU bug report logs -
#71586
[PATCH] services: web: Improve nginx formatting for extra-content
Previous Next
Full log
Message #11 received at 71586 <at> debbugs.gnu.org (full text, mbox):
* gnu/services/web (default-nginx-config): When extra-content is a list, add 4
space indentation and a newline to every line. If it's a string, continue
inserting it directly. This makes the list serialization behavior more
consistent with other services.
Change-Id: Iec8614ba3cfc37292a566197e8d39b352b04846a
---
Updated according to feedback. I agree that file-like objects should
be lowered into strings like they normally are and not serialized in
their package form.
emit-nginx-upstream-config has a similar issue.
gnu/services/web.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 406117c457..0572af1310 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -771,7 +771,12 @@ (define (default-nginx-config config)
"\n"
(map emit-nginx-upstream-config upstream-blocks)
(map emit-nginx-server-config server-blocks)
- extra-content
+ (match extra-content
+ ((? string? extra-content) extra-content)
+ ((? list? extra-content)
+ (map (lambda (line)
+ `(" " ,line "\n"))
+ extra-content)))
"\n}\n"))))
(define %nginx-accounts
base-commit: e32e3d0a03dc17c4c54a91aad053c9036998b601
--
2.45.1
This bug report was last modified 331 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.