diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-04-05 19:14:09 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-04-05 19:14:09 +0200 |
commit | fffabe7500e972eb5275199c82a35132a07fa29f (patch) | |
tree | d4afa9dac530f596b31cf8ccc856cb4b6fa96638 /lib/strings.nix | |
parent | 2999ab114e3e122ed3be44dc72e069e66a087de6 (diff) |
lib.sanitizeDerivationName: Simplify regex
`^` and `$` are implicit in `match`.
Diffstat (limited to 'lib/strings.nix')
-rw-r--r-- | lib/strings.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/strings.nix b/lib/strings.nix index 3a61f5be68b65..45d3bcbb440db 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 |