Skip to content

Commit

Permalink
Merge branch 'develop' into 4665-add-a-script-to-enable-running-tests…
Browse files Browse the repository at this point in the history
…-locally-in-the-exact-same-way-as-in-the-ci
  • Loading branch information
nmrshll authored Feb 1, 2025
2 parents a5c2acd + a2a18ac commit 7f0e6d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crates/iota-move/src/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ pub struct New {
impl New {
pub fn execute(self, path: Option<&Path>) -> anyhow::Result<()> {
let name = &self.new.name.to_lowercase();
let provided_name = &self.new.name.to_string();

self.new
.execute(path, [(IOTA_PKG_NAME, IOTA_PKG_PATH)], [(name, "0x0")], "")?;
let p = path.unwrap_or_else(|| Path::new(&name));
let p = path.unwrap_or_else(|| Path::new(&provided_name));
let mut w = std::fs::File::create(
p.join(SourcePackageLayout::Sources.path())
.join(format!("{name}.move")),
Expand Down
4 changes: 2 additions & 2 deletions external-crates/move/crates/move-cli/src/base/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ impl New {

if !Identifier::is_valid(&name) {
return Err(anyhow!(
"Invalid package name. Package name must start with a lowercase letter \
and consist only of lowercase letters, numbers, and underscores."
"Invalid package name. Package name must start with a letter or underscore \
and consist only of letters, numbers, and underscores."
));
}

Expand Down

0 comments on commit 7f0e6d3

Please sign in to comment.