Skip to content

Commit

Permalink
feat(arg-parsing): make the tag optional (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: Mathias Boulay <mathiasboulay@free.fr>
  • Loading branch information
Mathias-Boulay authored and BioTheWolff committed Apr 26, 2024
1 parent 67bd32e commit 057f048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fs-gen/src/cli_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Regex> = 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
Expand Down

0 comments on commit 057f048

Please sign in to comment.