Skip to content

Commit acd6dd9

Browse files
committed
fix(config): A bit looser program names
1 parent cc7be9b commit acd6dd9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/config-v3-documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ These can be basic:
5353
- False values: `0`, `False`, `false`, `f`, `no`, `n`, `off`
5454
- enum — One of the values specified in the key description.
5555
- 'string literal'
56-
- run_ref — String referencing a [`[run]`](#run) section. Must match the regex `[A-Za-z][A-Za-z0-9/_-]*`.
57-
- build_ref — String referencing a [`[build]`](#build) section. Must match the regex `[A-Za-z][A-Za-z0-9/_-]*`.
56+
- run_ref — String referencing a [`[run]`](#run) section. Must match the regex `[A-Za-z0-9][A-Za-z0-9./_^+-]*`.
57+
- build_ref — String referencing a [`[build]`](#build) section. Must match the regex `[A-Za-z0-9][A-Za-z0-9./_^+-]*`.
5858

5959
!!! info
6060
Through auto-expansion and auto-generation run_ref and build_ref values can interpreted as paths.

pisek/config/task_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def _validate_program_name(key: str, value: str) -> str:
106106
)
107107
for char in value:
108108
# Be careful, the hyphen has to be last
109-
if not re.fullmatch("[A-Za-z0-9./_-]", char):
109+
if not re.fullmatch("[A-Za-z0-9./_^+-]", char):
110110
raise PydanticCustomError(
111111
f"invalid_{error_key}",
112112
f"{key.capitalize()} must not contain '{char}'",

0 commit comments

Comments
 (0)