0
0
Fork 0
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:
Bartek Iwańczuk 2022-03-12 00:22:45 +01:00 committed by GitHub
parent 09ae512ccb
commit 5ebaa7943a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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",
),
);
}