FMT + consistent formatting

main
Michal 2 years ago
parent 8dc9690325
commit 60cdf55d6a
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -70,8 +70,8 @@ fn main() {
"Cannot prune packages in workspace mode" "Cannot prune packages in workspace mode"
); );
} }
operations::prune(verbose) operations::prune(verbose);
}, }
Operation::Clean => operations::clean(verbose), Operation::Clean => operations::clean(verbose),
Operation::Info => operations::info(verbose), Operation::Info => operations::info(verbose),
} }

@ -1,9 +1,10 @@
use crate::{crash, info, internal::AppExitCode, log};
use colored::Colorize; use colored::Colorize;
use std::env; use std::env;
use std::process::Command; use std::process::Command;
use tabled::Tabled; use tabled::Tabled;
use crate::{crash, info, internal::AppExitCode, log};
// For displaying the table of contents // For displaying the table of contents
#[derive(Clone, tabled::Tabled, Debug)] #[derive(Clone, tabled::Tabled, Debug)]
struct RepoDisplayGit { struct RepoDisplayGit {
@ -53,7 +54,8 @@ pub fn git_status(verbose: bool, repo: &str, colorblind: bool) -> String {
let output = String::from_utf8(output.stdout).unwrap(); let output = String::from_utf8(output.stdout).unwrap();
log!(verbose, "Git status: {}", output); log!(verbose, "Git status: {}", output);
let unstaged = output.contains("Changes not staged for commit") || output.contains("Changes to be committed"); let unstaged = output.contains("Changes not staged for commit")
|| output.contains("Changes to be committed");
let untracked = output.contains("Untracked files"); let untracked = output.contains("Untracked files");
let dirty = unstaged || untracked; let dirty = unstaged || untracked;

@ -38,6 +38,7 @@ repos = [
crs = "https://github.com/crystal-linux/{}" crs = "https://github.com/crystal-linux/{}"
aur = "https://aur.archlinux.org/{}" aur = "https://aur.archlinux.org/{}"
"#; "#;
pub fn create(verbose: bool) { pub fn create(verbose: bool) {
// Ensure current directory is empty // Ensure current directory is empty
if env::current_dir() if env::current_dir()

Loading…
Cancel
Save