-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
mod build; | ||
mod init; | ||
mod markdown; | ||
mod script; | ||
mod lockfile; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use anyhow::{bail, Result}; | ||
use anyhow::Result; | ||
|
||
use crate::api::{app::App, models::Environment, step::Step}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ pub mod markdown; | |
pub mod migrate; | ||
pub mod websocket; | ||
pub mod run; | ||
pub mod update; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
use std::sync::Arc; | ||
|
||
use anyhow::Result; | ||
use console::style; | ||
|
||
use crate::api::app::App; | ||
use crate::api::{app::App, models::{ModpackSource, SourceType}}; | ||
Check warning on line 6 in src/commands/sources/list.rs GitHub Actions / clippyunused import: `ModpackSource`
|
||
|
||
#[derive(clap::Args)] | ||
pub struct Args {} | ||
|
||
pub async fn run(app: Arc<App>, args: Args) -> Result<()> { | ||
Check warning on line 11 in src/commands/sources/list.rs GitHub Actions / clippyunused variable: `args`
|
||
let sources = app.collect_sources().await?; | ||
|
||
println!("{sources:#?}"); | ||
for (idx, (base, source)) in sources.iter().enumerate() { | ||
println!( | ||
"{} {}{}", | ||
style(idx.to_string() + ".").cyan().bold(), | ||
style(source.source_name()).bold(), | ||
match source.source_type { | ||
SourceType::Modpack { modpack_type, .. } => format!( | ||
"/{}", style(modpack_type.to_string()).bold() | ||
), | ||
_ => String::new(), | ||
} | ||
); | ||
|
||
println!(" -> {}", style(source.accessor(base)?.to_string()).dim()) | ||
Check warning on line 27 in src/commands/sources/list.rs GitHub Actions / clippyconsider adding a `;` to the last statement for consistent formatting
|
||
} | ||
|
||
Ok(()) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use std::sync::Arc; | ||
|
||
use anyhow::Result; | ||
|
||
use crate::api::{app::App, tools::git::version_check}; | ||
|
||
#[derive(clap::Args)] | ||
pub struct Args { | ||
|
||
} | ||
|
||
pub async fn run(app: Arc<App>, args: Args) -> Result<()> { | ||
Check warning on line 12 in src/commands/update.rs GitHub Actions / clippyunused variable: `args`
Check warning on line 12 in src/commands/update.rs GitHub Actions / clippyunused variable: `app`
|
||
println!("{:#?}", version_check()); | ||
|
||
Ok(()) | ||
} | ||
Check warning on line 16 in src/commands/update.rs GitHub Actions / clippyunused `async` for function with no await statements
|
||
|