fmt + fixed #4

main
michal 3 years ago
parent 90011992c1
commit 8eeb2aa841

@ -12,9 +12,9 @@ use crate::workspace::read_cfg;
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
mod internal;
mod operations;
mod repository;
mod workspace;
mod operations;
fn main() {
extern "C" {
@ -137,11 +137,11 @@ fn main() {
}
if let true = matches.is_present("reinit") {
operations::reinit();
operations::reinit();
}
if let true = matches.is_present("build") {
operations::build(&matches);
operations::build(&matches);
}
if let true = matches.is_present("pull") {

@ -1,5 +1,6 @@
use clap::ArgMatches;
use crate::repository::generate;
use crate::{crash, repository, workspace};
use clap::ArgMatches;
pub fn build(matches: &ArgMatches) {
let config = workspace::read_cfg();
@ -15,7 +16,6 @@ pub fn build(matches: &ArgMatches) {
.values_of_lossy("exclude")
.unwrap_or_default();
for pkg in &exclude {
packages.retain(|x| &*x != pkg);
}
@ -57,6 +57,7 @@ pub fn build(matches: &ArgMatches) {
for pkg in repos {
repository::build(pkg);
}
generate();
}
if matches

@ -1,3 +1,8 @@
use crate::create_config;
use std::env;
use std::path::Path;
use std::process::Command;
pub fn config() {
if !Path::exists("mlc.toml".as_ref()) {
create_config();

@ -1,5 +1,5 @@
use std::process::Command;
use crate::{crash, info, workspace};
use std::process::Command;
pub fn reinit() {
let config = workspace::read_cfg();

@ -1,9 +1,9 @@
use clap::ArgMatches;
mod init;
mod build;
mod pull;
mod config;
mod init;
mod pull;
pub fn reinit() {
init::reinit();

@ -1,7 +1,7 @@
use crate::{info, workspace};
use clap::ArgMatches;
use std::env;
use std::process::Command;
use clap::ArgMatches;
use crate::{info, workspace};
pub fn pull(matches: &ArgMatches) {
let packages: Vec<String> = matches

Loading…
Cancel
Save