diff options
author | Henrique Alves <henriquelalves@gmail.com> | 2022-08-16 21:52:11 -0300 |
---|---|---|
committer | Henrique Alves <henriquelalves@gmail.com> | 2022-08-16 21:52:11 -0300 |
commit | 7dff0dcc148362117a4b4e6110421cd26880440c (patch) | |
tree | 3a891e4b1ba48aac2499a20786d189abb94a5a14 /src/main.rs | |
parent | 0f75eec7337012dacfa627952fe3785cf0589151 (diff) | |
download | glam-7dff0dcc148362117a4b4e6110421cd26880440c.tar.gz glam-7dff0dcc148362117a4b4e6110421cd26880440c.tar.bz2 glam-7dff0dcc148362117a4b4e6110421cd26880440c.zip |
Fix addon with different name than gitrepo (only allowing one addon per glam package for now)
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index cb399d9..0412f52 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,8 +60,8 @@ enum Commands { /// Apply changes to a package Apply { - /// Name of the package to apply changes to - package_name: String, + /// Names of the package to apply changes to + package_names: Vec<String>, /// Create new package from the specified addon folder (will create a git repo) #[clap(short, long, required = false, default_value = "")] create_from_addon: String, @@ -113,11 +113,14 @@ fn main() { commands::remove_package(&root, &package_name, cli.verbose); }, - Commands::Apply {package_name, create_from_addon} => { + Commands::Apply {package_names, create_from_addon} => { let root = commands::search_project_root(); commands::check_ignores(&root); commands::initialize_glam_files(&root); - commands::apply_changes(&root, &package_name, &create_from_addon, cli.verbose); + for package_name in package_names { + commands::apply_changes(&root, &package_name, &create_from_addon, cli.verbose); + } + }, } } |