From 1dd49eca13bd8c0bec58e4dcc6aecbb19c998b81 Mon Sep 17 00:00:00 2001 From: "Yang, Bo" Date: Fri, 22 Mar 2024 10:44:48 -0700 Subject: [PATCH] Support dotenv comments --- src/modules/integrations/dotenv.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/integrations/dotenv.nix b/src/modules/integrations/dotenv.nix index 61cf84d6b..fe7e147c5 100644 --- a/src/modules/integrations/dotenv.nix +++ b/src/modules/integrations/dotenv.nix @@ -9,7 +9,7 @@ let parseLine = line: let - parts = builtins.match "(.+) *= *(.+)" line; + parts = builtins.match "([^[:space:]=#]+)[[:space:]]*=[[:space:]]*(.*)" line; in if (!builtins.isNull parts) && (builtins.length parts) == 2 then { name = builtins.elemAt parts 0; value = builtins.elemAt parts 1; }