Skip to content

Commit

Permalink
Support passing multiple paths
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-bergia committed Oct 27, 2022
1 parent a629bcf commit 58ad73b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kree"
version = "0.3.0"
version = "0.4.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use std::{
#[derive(Parser)]
#[command()]
struct Args {
/// Path to the kustomization file or directory
path: RelativePathBuf,
/// Path(s) to the kustomization file or directory
path: Vec<RelativePathBuf>,

/// Output format
#[arg(short, long, value_enum, default_value = "text")]
Expand Down Expand Up @@ -101,7 +101,9 @@ fn main() {
let root = current_dir().unwrap();
let mut result = Vec::new();

run(&root, args.path, &mut result);
for p in args.path.iter() {
run(&root, p.clone(), &mut result);
}

result.sort();
result.dedup();
Expand Down

0 comments on commit 58ad73b

Please sign in to comment.