fix: update Config initializers with new field
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6c1abd66baf81256f73ae03846673ebf6a6a6964
This commit is contained in:
parent
92c3215e67
commit
3414b9f1a4
2 changed files with 30 additions and 20 deletions
|
|
@ -47,16 +47,21 @@ pub async fn execute(
|
|||
lockfile.save(lockfile_dir)?;
|
||||
|
||||
let config = Config {
|
||||
name: args.name.unwrap_or_else(|| "My Modpack".to_string()),
|
||||
version: args.version.unwrap_or_else(|| "1.0.0".to_string()),
|
||||
description: None,
|
||||
author: None,
|
||||
overrides: vec!["overrides".to_string()],
|
||||
server_overrides: None,
|
||||
client_overrides: None,
|
||||
paths: HashMap::new(),
|
||||
projects: None,
|
||||
export_profiles: None,
|
||||
name: args
|
||||
.name
|
||||
.unwrap_or_else(|| "My Modpack".to_string()),
|
||||
version: args
|
||||
.version
|
||||
.unwrap_or_else(|| "1.0.0".to_string()),
|
||||
description: None,
|
||||
author: None,
|
||||
overrides: vec!["overrides".to_string()],
|
||||
server_overrides: None,
|
||||
client_overrides: None,
|
||||
paths: HashMap::new(),
|
||||
projects: None,
|
||||
export_profiles: None,
|
||||
export_server_side_projects_to_client: None,
|
||||
};
|
||||
|
||||
let config_dir = config_path.parent().unwrap_or(Path::new("."));
|
||||
|
|
|
|||
|
|
@ -721,16 +721,21 @@ mod tests {
|
|||
lockfile_version: 1,
|
||||
},
|
||||
config: Config {
|
||||
name: "Test Pack".to_string(),
|
||||
version: "1.0.0".to_string(),
|
||||
description: None,
|
||||
author: None,
|
||||
overrides: vec!["overrides".to_string()],
|
||||
server_overrides: Some(vec!["server-overrides".to_string()]),
|
||||
client_overrides: Some(vec!["client-overrides".to_string()]),
|
||||
paths: HashMap::new(),
|
||||
projects: None,
|
||||
export_profiles: None,
|
||||
name: "Test Pack".to_string(),
|
||||
version: "1.0.0".to_string(),
|
||||
description: None,
|
||||
author: None,
|
||||
overrides: vec!["overrides".to_string()],
|
||||
server_overrides: Some(vec![
|
||||
"server-overrides".to_string(),
|
||||
]),
|
||||
client_overrides: Some(vec![
|
||||
"client-overrides".to_string(),
|
||||
]),
|
||||
paths: HashMap::new(),
|
||||
projects: None,
|
||||
export_profiles: None,
|
||||
export_server_side_projects_to_client: None,
|
||||
},
|
||||
profile_config,
|
||||
export_path: PathBuf::from("/tmp/export"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue