mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
feat(task): allow colons in task name (#13918)
This commit is contained in:
parent
09ae512ccb
commit
5ebaa7943a
1 changed files with 3 additions and 3 deletions
|
@ -23,9 +23,9 @@ fn get_tasks_config(
|
|||
bail!("Configuration file task names cannot be empty");
|
||||
} else if !key
|
||||
.chars()
|
||||
.all(|c| c.is_ascii_alphanumeric() || matches!(c, '_' | '-'))
|
||||
.all(|c| c.is_ascii_alphanumeric() || matches!(c, '_' | '-' | ':'))
|
||||
{
|
||||
bail!("Configuration file task names must only contain alpha-numeric characters, underscores (_), or dashes (-). Task: {}", key);
|
||||
bail!("Configuration file task names must only contain alpha-numeric characters, colons (:), underscores (_), or dashes (-). Task: {}", key);
|
||||
} else if !key.chars().next().unwrap().is_ascii_alphabetic() {
|
||||
bail!("Configuration file task names must start with an alphabetic character. Task: {}", key);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ mod test {
|
|||
}"#,
|
||||
concat!(
|
||||
"Configuration file task names must only contain alpha-numeric ",
|
||||
"characters, underscores (_), or dashes (-). Task: some%test",
|
||||
"characters, colons (:), underscores (_), or dashes (-). Task: some%test",
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue