From fffabe7500e972eb5275199c82a35132a07fa29f Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 5 Apr 2022 19:14:09 +0200 Subject: [PATCH] lib.sanitizeDerivationName: Simplify regex `^` and `$` are implicit in `match`. --- lib/strings.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/strings.nix b/lib/strings.nix index 3a61f5be68b6..45d3bcbb440d 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -757,7 +757,7 @@ rec { => "-nix-store-2g75chlbpxlrqn15zlby2dfh8hr9qwbk-hello-2.10" */ sanitizeDerivationName = - let okRegex = match "^[[:alnum:]+_?=-][[:alnum:]+._?=-]*$"; + let okRegex = match "[[:alnum:]+_?=-][[:alnum:]+._?=-]*"; in string: # First detect the common case of already valid strings, to speed those up