From 5ebaa7943a303057110c8a3709ebf4244b77f8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 12 Mar 2022 00:22:45 +0100 Subject: feat(task): allow colons in task name (#13918) --- cli/tools/task.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/tools') 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", ), ); } -- cgit v1.2.3