mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 11:20:10 +00:00
types.singleLineStr: Disallow \r
(cherry picked from commit f25a13212b)
This commit is contained in:
committed by
github-actions[bot]
parent
deb63b0aae
commit
03dc83a53c
@@ -302,9 +302,8 @@ rec {
|
||||
|
||||
singleLineStr = mkOptionType {
|
||||
name = "singleLineStr";
|
||||
description = "string that doesn't contain '\\n'";
|
||||
check = x: str.check x && !(lib.hasInfix "\n" x);
|
||||
inherit (str) merge;
|
||||
description = "string that doesn't contain [\\n\\r]";
|
||||
inherit (strMatching "[^\n\r]*") check merge;
|
||||
};
|
||||
|
||||
strMatching = pattern: mkOptionType {
|
||||
|
||||
Reference in New Issue
Block a user