Skip to content

Commit

Permalink
WorldOption already fall backs to reading from Scarb.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-0x committed Jan 21, 2024
1 parent 1698689 commit 5225c23
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions crates/sozo/src/commands/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,9 @@ pub struct MigrateArgs {
}

impl MigrateArgs {
pub fn run(mut self, config: &Config) -> Result<()> {
pub fn run(self, config: &Config) -> Result<()> {
let ws = scarb::ops::read_workspace(config.manifest_path(), config)?;

// If `name` was not specified use package name from `Scarb.toml` file if it exists
if self.name.is_none() {
if let Some(root_package) = ws.root_package() {
self.name = Some(root_package.id.name.to_string());
}
}

let target_dir = ws.target_dir().path_existent().unwrap();
let target_dir = target_dir.join(ws.config().profile().as_str());

Expand Down

0 comments on commit 5225c23

Please sign in to comment.