Fixed ! retaining in URLs to clone

main
Michal 2 years ago
parent eace7d727e
commit 711a39fdd5
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -18,9 +18,6 @@ pub struct Args {
#[clap(short = 'x', long = "exclude", action = ArgAction::Append, takes_value = true)]
pub exclude: Vec<String>,
/// Operates on all packages in the workspace, if applicable
#[clap(long = "all", action = ArgAction::SetTrue, conflicts_with = "package(s)")]
pub all: bool,
}
#[derive(Debug, Clone, Subcommand)]
@ -42,7 +39,7 @@ pub enum Operation {
RepoGen,
/// Clones all git repositories from mlc.toml branching from current directory
#[clap(name = "clone", aliases = & ["c"])]
#[clap(name = "clone", aliases = & ["init", "i", "c"])]
Clone,
/// Pulls in git repositories from mlc.toml branching from current directory

@ -40,7 +40,7 @@ pub fn read_cfg() -> Config {
// Parses all necessary values for expanding the repo to a Repo struct
let index = split_struct.indx;
let name = split_struct.name.replace('!', "");
let url = config.urls[index - 1].replace("%repo%", &split_struct.name);
let url = config.urls[index - 1].replace("%repo%", &name);
let priority = &split_struct.name.matches('!').count();
// Creates and pushes Repo struct to expanded_repos

Loading…
Cancel
Save