diff --git a/leo/cli/cli.rs b/leo/cli/cli.rs index 4ac65e7dff..425127e9cc 100644 --- a/leo/cli/cli.rs +++ b/leo/cli/cli.rs @@ -19,8 +19,8 @@ use leo_errors::Result; use clap::Parser; use colored::Colorize; -use std::{path::PathBuf, process::exit}; use serial_test::serial; +use std::{path::PathBuf, process::exit}; /// CLI Arguments entry point - includes global parameters and subcommands #[derive(Parser, Debug)] diff --git a/leo/cli/commands/build.rs b/leo/cli/commands/build.rs index a3bc06cf67..386b1ac841 100644 --- a/leo/cli/commands/build.rs +++ b/leo/cli/commands/build.rs @@ -97,13 +97,13 @@ impl Command for Build { let package_path = context.dir()?; let home_path = context.home()?; + // Open the build directory. + let build_directory = BuildDirectory::open(&package_path)?; + // Get the program id. let manifest = context.open_manifest()?; let program_id = manifest.program_id(); - // Open the build directory. - let build_directory = BuildDirectory::open(&package_path)?; - // Initialize error handler let handler = Handler::default();