lib.sanitizeDerivationName: Simplify regex
`^` and `$` are implicit in `match`.
This commit is contained in:
parent
2999ab114e
commit
fffabe7500
@ -757,7 +757,7 @@ rec {
|
|||||||
=> "-nix-store-2g75chlbpxlrqn15zlby2dfh8hr9qwbk-hello-2.10"
|
=> "-nix-store-2g75chlbpxlrqn15zlby2dfh8hr9qwbk-hello-2.10"
|
||||||
*/
|
*/
|
||||||
sanitizeDerivationName =
|
sanitizeDerivationName =
|
||||||
let okRegex = match "^[[:alnum:]+_?=-][[:alnum:]+._?=-]*$";
|
let okRegex = match "[[:alnum:]+_?=-][[:alnum:]+._?=-]*";
|
||||||
in
|
in
|
||||||
string:
|
string:
|
||||||
# First detect the common case of already valid strings, to speed those up
|
# First detect the common case of already valid strings, to speed those up
|
||||||
|
Loading…
Reference in New Issue
Block a user