1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-11 08:33:43 -05:00

fix(cli): Allow executable name start with digit (#21214)

This commit is contained in:
Bolat Azamat 2023-11-15 22:17:09 +06:00 committed by GitHub
parent 7f3902b41f
commit 7687ec87e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ use std::path::PathBuf;
use std::os::unix::fs::PermissionsExt;
static EXEC_NAME_RE: Lazy<Regex> = Lazy::new(|| {
RegexBuilder::new(r"^[a-z][\w-]*$")
RegexBuilder::new(r"^[a-z0-9][\w-]*$")
.case_insensitive(true)
.build()
.expect("invalid regex")