Skip to content

Commit

Permalink
project name conversion to kebab case
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrinathNR committed Dec 2, 2024
1 parent dab3fcc commit 9f661c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ pub fn init(name: &String) {
return;
}

execute_cmd(Command::new("anchor").args(["init", name.as_str()]));
let project_name = name.to_case(Case::Kebab);

let project_path = Path::new(&name);
execute_cmd(Command::new("anchor").args(["init", project_name.as_str()]));

let project_path = Path::new(&project_name);

// Create the ts-programs directory
let ts_programs_path = project_path.join("ts-programs");
Expand Down

0 comments on commit 9f661c7

Please sign in to comment.