Fmt and whatnot

main
Michal 2 years ago
parent 44627c25fc
commit 6694c50c4d
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -1,6 +1,6 @@
use crate::{crash, info, log, repository, workspace};
use crate::internal::AppExitCode;
use crate::internal::structs::{ErroredPackage, Repo};
use crate::internal::AppExitCode;
use crate::{crash, info, log, repository, workspace};
pub fn build(packages: Vec<String>, exclude: Vec<String>, no_regen: bool, verbose: bool) {
// Read config struct from mlc.toml

@ -2,12 +2,12 @@ pub use build::*;
pub use clean::*;
pub use clone::*;
pub use config::*;
pub use pull::*;
pub use prune::*;
pub use pull::*;
mod build;
mod clean;
mod clone;
mod config;
mod prune;
mod pull;
mod prune;

@ -1,9 +1,9 @@
use std::env;
use std::path::PathBuf;
use std::fs;
use crate::info;
use crate::log;
use crate::read_cfg;
use std::env;
use std::fs;
use std::path::PathBuf;
#[derive(Debug, Clone)]
struct PackageFile {
@ -97,9 +97,8 @@ pub fn prune(verbose: bool) {
for p in packages_to_delete.iter() {
let path = format!("{}-{}-{}", p.name, p.ver, p.ext);
log!(verbose, "Deleting {}", path);
std::process::Command::new("bash").args(&["-c",
&format!("rm -rf ./{} ./{}.sig", path, path)
])
std::process::Command::new("bash")
.args(&["-c", &format!("rm -rf ./{} ./{}.sig", path, path)])
.output()
.unwrap();
}
@ -113,4 +112,4 @@ pub fn prune(verbose: bool) {
for p in packages_to_delete.iter_mut() {
info!("{}-{}-{}", p.name, p.ver, p.ext);
}
}
}

@ -1,8 +1,8 @@
use std::env;
use std::process::Command;
use crate::{crash, internal::AppExitCode, log};
use crate::info;
use crate::{crash, internal::AppExitCode, log};
fn do_the_pulling(repos: Vec<String>, verbose: bool) {
for repo in repos {

@ -3,8 +3,8 @@ use std::fs::File;
use std::io::Write;
use std::path::Path;
use crate::{crash, log};
use crate::internal::AppExitCode;
use crate::{crash, log};
const DEFAULT_CONFIG: &str = r#"
# Either "repository" or "workspace"

@ -1,9 +1,9 @@
use std::{env, fs};
use std::path::Path;
use std::process::Command;
use std::{env, fs};
use crate::{crash, log};
use crate::internal::AppExitCode;
use crate::{crash, log};
pub fn build(pkg: &str, sign: bool, verbose: bool) -> i32 {
log!(verbose, "Building {}", pkg);

@ -1,6 +1,6 @@
use std::{env, fs};
use std::path::Path;
use std::process::Command;
use std::{env, fs};
use crate::{log, workspace::read_cfg};

@ -1,9 +1,9 @@
use std::fs;
use std::path::Path;
use crate::{crash, log};
use crate::internal::AppExitCode;
use crate::internal::structs::{Config, Repo, SplitRepo, UnexpandedConfig};
use crate::internal::AppExitCode;
use crate::{crash, log};
pub fn read_cfg(verbose: bool) -> Config {
// Crash if mlc.toml doesn't exist

Loading…
Cancel
Save