summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-03-12 00:22:45 +0100
committerGitHub <noreply@github.com>2022-03-11 18:22:45 -0500
commit5ebaa7943a303057110c8a3709ebf4244b77f8f3 (patch)
treef3335d4fbefd630a8f827457072278daeb38d521
parent09ae512ccb4d8a36a0c6c1a700b48fdd3f9fc6c2 (diff)
feat(task): allow colons in task name (#13918)
-rw-r--r--cli/tools/task.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tools/task.rs b/cli/tools/task.rs
index 3cfce107e..0e863dbb8 100644
--- a/cli/tools/task.rs
+++ b/cli/tools/task.rs
@@ -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",
),
);
}