From 057f0488d4b5e01543cba793297baede2c43fd14 Mon Sep 17 00:00:00 2001 From: Mathias Boulay Date: Tue, 23 Apr 2024 11:32:31 +0200 Subject: [PATCH] feat(arg-parsing): make the tag optional (#4) Signed-off-by: Mathias Boulay --- src/fs-gen/src/cli_args.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs-gen/src/cli_args.rs b/src/fs-gen/src/cli_args.rs index dae89d6..a0ecd0c 100644 --- a/src/fs-gen/src/cli_args.rs +++ b/src/fs-gen/src/cli_args.rs @@ -7,7 +7,7 @@ use once_cell::sync::Lazy; // So, for any of you who may be scared, this is the regex from the OCI Distribution Sepcification for the image name + the tag static RE_IMAGE_NAME: Lazy = Lazy::new(|| { - Regex::new(r"[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*(\/[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*)*:[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}").unwrap() + Regex::new(r"[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*(/[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*)*(?::[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127})?").unwrap() }); /// Convert an OCI image into a CPIO file