Skip to content

Commit

Permalink
[CLI] use Identifier::is_valid to check sui move new package name…
Browse files Browse the repository at this point in the history
… validity
  • Loading branch information
howtosui committed May 17, 2024
1 parent bf31f77 commit 6faec06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion external-crates/move/crates/move-cli/src/base/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ impl New {
let Self { name } = self;

if !Identifier::is_valid(&name) {
return Err(anyhow!("invalid package name, not a valid Move identifier"));
return Err(anyhow!(
"invalid package name, please use lowercase letters, numbers, and underscores, \
should start with a lowercase letter."
));
}

let p: PathBuf;
Expand Down

0 comments on commit 6faec06

Please sign in to comment.