cli: wire shelve flag; more clippy fixes

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I694da71afe93bcb33687ff7d8e75f04f6a6a6964
This commit is contained in:
raf 2026-02-12 23:21:59 +03:00
commit 5385c0f4ed
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 18 additions and 16 deletions

View file

@ -35,7 +35,7 @@ pub async fn execute(
let config_dir = config_path.parent().unwrap_or(Path::new("."));
// IPC coordination - prevent concurrent operations on the same modpack
let ipc = IpcCoordinator::new(&config_dir.to_path_buf())?;
let ipc = IpcCoordinator::new(config_dir)?;
let ipc_timeout = std::time::Duration::from_secs(60);
// Check for conflicting export operations

View file

@ -37,8 +37,8 @@ pub async fn execute(
let operation_id = coordinator.register_operation(OperationType::Fetch)?;
let _guard = OperationGuard::new(coordinator, operation_id);
// Create fetcher
let fetcher = Fetcher::new(".");
// Create fetcher with shelve option
let fetcher = Fetcher::new(".").with_shelve(args.shelve);
// Fetch all projects (progress indicators handled in fetch.rs)
fetcher.fetch_all(&lockfile, &config).await?;

View file

@ -211,13 +211,12 @@ fn execute_init(
.args(["log", "--limit", "1", "--template", ""])
.current_dir(path)
.output()
&& !output.stdout.is_empty()
{
if !output.stdout.is_empty() {
println!(
"Note: Jujutsu repository detected. Make sure to run 'jj git \
push' to sync changes with remote if needed."
);
}
println!(
"Note: Jujutsu repository detected. Make sure to run 'jj git \
push' to sync changes with remote if needed."
);
}
},
VcsType::None => {

View file

@ -134,16 +134,19 @@ async fn import_modrinth(
{
log::info!("Fetching project: {project_id}");
match platform
.request_project_with_files(project_id, &lockfile.mc_versions, &[
loader.0.clone(),
])
.request_project_with_files(
project_id,
&lockfile.mc_versions,
std::slice::from_ref(&loader.0),
)
.await
{
Ok(mut project) => {
// Select best file
if let Err(e) =
project.select_file(&lockfile.mc_versions, &[loader.0.clone()])
{
if let Err(e) = project.select_file(
&lockfile.mc_versions,
std::slice::from_ref(&loader.0),
) {
log::warn!(
"Failed to select file for {}: {}",
project.get_name(),
@ -357,7 +360,7 @@ async fn import_curseforge(
description: None,
author: manifest["author"]
.as_str()
.map(|s| s.to_string()),
.map(std::string::ToString::to_string),
overrides: vec!["overrides".to_string()],
server_overrides: None,
client_overrides: None,