Skip to content

Commit

Permalink
use @ instead of # for specifying a template branch (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBearodactyl authored Nov 16, 2024
1 parent 27e96c4 commit 4fa84c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ fn create_template(template: CreateTemplate) {
.nice_unwrap("Unable to create project directory");
}

let (used_template, branch) = if template.template.contains('#') {
template.template.split_once('#').unwrap()
let (used_template, branch) = if template.template.contains('@') {
template.template.split_once('@').unwrap()
} else if template.template.contains('/') {
(template.template.as_str(), "main")
} else if template.template.is_empty() {
Expand Down Expand Up @@ -177,7 +177,7 @@ pub fn build_template(config: &mut Config, location: Option<PathBuf>) {
info!("Default: Create a simple mod that adds a button to the main menu.");
info!("Minimal: Create a minimal mod with only the necessary files.");
info!("Custom Layer: Create a mod with a custom layer and more UI elements.");
info!("Alternatively, you could use your own template: 'user/repo', 'user/repo#branch'");
info!("Alternatively, you could use your own template: 'user/repo', 'user/repo@branch'");
let template = ask_value("Template", Some(""), false);

let final_name = ask_value("Name", possible_name(&location).as_deref(), true);
Expand Down

0 comments on commit 4fa84c9

Please sign in to comment.