cli: wire shelve flag; more clippy fixes
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I694da71afe93bcb33687ff7d8e75f04f6a6a6964
This commit is contained in:
parent
1db1d4d6d2
commit
5385c0f4ed
4 changed files with 18 additions and 16 deletions
|
|
@ -35,7 +35,7 @@ pub async fn execute(
|
||||||
let config_dir = config_path.parent().unwrap_or(Path::new("."));
|
let config_dir = config_path.parent().unwrap_or(Path::new("."));
|
||||||
|
|
||||||
// IPC coordination - prevent concurrent operations on the same modpack
|
// 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);
|
let ipc_timeout = std::time::Duration::from_secs(60);
|
||||||
|
|
||||||
// Check for conflicting export operations
|
// Check for conflicting export operations
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ pub async fn execute(
|
||||||
let operation_id = coordinator.register_operation(OperationType::Fetch)?;
|
let operation_id = coordinator.register_operation(OperationType::Fetch)?;
|
||||||
let _guard = OperationGuard::new(coordinator, operation_id);
|
let _guard = OperationGuard::new(coordinator, operation_id);
|
||||||
|
|
||||||
// Create fetcher
|
// Create fetcher with shelve option
|
||||||
let fetcher = Fetcher::new(".");
|
let fetcher = Fetcher::new(".").with_shelve(args.shelve);
|
||||||
|
|
||||||
// Fetch all projects (progress indicators handled in fetch.rs)
|
// Fetch all projects (progress indicators handled in fetch.rs)
|
||||||
fetcher.fetch_all(&lockfile, &config).await?;
|
fetcher.fetch_all(&lockfile, &config).await?;
|
||||||
|
|
|
||||||
|
|
@ -211,13 +211,12 @@ fn execute_init(
|
||||||
.args(["log", "--limit", "1", "--template", ""])
|
.args(["log", "--limit", "1", "--template", ""])
|
||||||
.current_dir(path)
|
.current_dir(path)
|
||||||
.output()
|
.output()
|
||||||
|
&& !output.stdout.is_empty()
|
||||||
{
|
{
|
||||||
if !output.stdout.is_empty() {
|
println!(
|
||||||
println!(
|
"Note: Jujutsu repository detected. Make sure to run 'jj git \
|
||||||
"Note: Jujutsu repository detected. Make sure to run 'jj git \
|
push' to sync changes with remote if needed."
|
||||||
push' to sync changes with remote if needed."
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
VcsType::None => {
|
VcsType::None => {
|
||||||
|
|
|
||||||
|
|
@ -134,16 +134,19 @@ async fn import_modrinth(
|
||||||
{
|
{
|
||||||
log::info!("Fetching project: {project_id}");
|
log::info!("Fetching project: {project_id}");
|
||||||
match platform
|
match platform
|
||||||
.request_project_with_files(project_id, &lockfile.mc_versions, &[
|
.request_project_with_files(
|
||||||
loader.0.clone(),
|
project_id,
|
||||||
])
|
&lockfile.mc_versions,
|
||||||
|
std::slice::from_ref(&loader.0),
|
||||||
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
Ok(mut project) => {
|
Ok(mut project) => {
|
||||||
// Select best file
|
// Select best file
|
||||||
if let Err(e) =
|
if let Err(e) = project.select_file(
|
||||||
project.select_file(&lockfile.mc_versions, &[loader.0.clone()])
|
&lockfile.mc_versions,
|
||||||
{
|
std::slice::from_ref(&loader.0),
|
||||||
|
) {
|
||||||
log::warn!(
|
log::warn!(
|
||||||
"Failed to select file for {}: {}",
|
"Failed to select file for {}: {}",
|
||||||
project.get_name(),
|
project.get_name(),
|
||||||
|
|
@ -357,7 +360,7 @@ async fn import_curseforge(
|
||||||
description: None,
|
description: None,
|
||||||
author: manifest["author"]
|
author: manifest["author"]
|
||||||
.as_str()
|
.as_str()
|
||||||
.map(|s| s.to_string()),
|
.map(std::string::ToString::to_string),
|
||||||
overrides: vec!["overrides".to_string()],
|
overrides: vec!["overrides".to_string()],
|
||||||
server_overrides: None,
|
server_overrides: None,
|
||||||
client_overrides: None,
|
client_overrides: None,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue