From 974c2e05af96ca2681239e41b1281cdb0d22347f Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 21 Jul 2020 19:36:21 -0400 Subject: feat(web/panettone): Read config from env Read the port and data directory from environment variables, in preparation for deploying as a systemd unit to Whitby Change-Id: I066dced7b7926b6bdc77132d13a4da6c886b20e8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1338 Tested-by: BuildkiteCI Reviewed-by: tazjin --- lisp/klatre/klatre.lisp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp/klatre/klatre.lisp') diff --git a/lisp/klatre/klatre.lisp b/lisp/klatre/klatre.lisp index b20d1ab5282a..50cc510502e8 100644 --- a/lisp/klatre/klatre.lisp +++ b/lisp/klatre/klatre.lisp @@ -88,3 +88,9 @@ separated by SEP." (comment (format-dottime (local-time:now))) + +(defun try-parse-integer (str) + "Attempt to parse STR as an integer, returning nil if it is invalid." + (check-type str string) + (handler-case (parse-integer str) + (sb-int:simple-parse-error (_) nil))) -- cgit 1.4.1