OPGKOYLZ5CGHISV2EGC7QO5Y5MWUOOABPLTAG7PM64BMQRGSALRAC
L7RWDRWIXOFXUG6UBHF266UCQXZQORJKCDWZEBDRIIIFSD3RIR4AC
7CIFOEDQD725EPSFBZFFF3H6VJQTZELLSSVKAB35S2HYYNNYK2XAC
GFBTP7TIMBHKB34LL3HGQI32UQKPEI4Y2XUZ7RZUCXXSD3UABLCAC
UUNCAERSPFG56ZNDLR2AREKFB4EQDRKXNY2B43DXHDHJ5Y4GHCTQC
use relative_path::RelativePathBuf;
path: Vec<RelativePathBuf>,
path: Vec<PathBuf>,
fn normalize(root: &PathBuf, mut path: RelativePathBuf) -> RelativePathBuf { path.normalize();
fn normalize(root: &PathBuf, mut path: RelativePathBuf) -> RelativePathBuf {
path.normalize();
fn normalize(path: PathBuf) -> PathBuf { let mut canonical = path.canonicalize().unwrap();
fn normalize(path: PathBuf) -> PathBuf {
let mut canonical = path.canonicalize().unwrap();
if path.to_logical_path(&root).is_dir() { path.push("kustomization.yml");
if path.to_logical_path(&root).is_dir() {
path.push("kustomization.yml");
if canonical.is_dir() { canonical.push("kustomization.yml");
if canonical.is_dir() {
canonical.push("kustomization.yml");
if path.to_logical_path(&root).is_file() { return path;
if path.to_logical_path(&root).is_file() {
return path;
if canonical.is_file() { return canonical;
if canonical.is_file() {
return canonical;
path.set_extension("yaml");
canonical.set_extension("yaml");
panic!("Unable to normalize path {path}");
panic!("Unable to normalize path {}", path.display());
fn run(root: &PathBuf, path: RelativePathBuf, result: &mut Vec<String>) { let current_path = normalize(&root, path.clone());
fn run(root: &PathBuf, path: RelativePathBuf, result: &mut Vec<String>) {
let current_path = normalize(&root, path.clone());
fn run(path: PathBuf, result: &mut Vec<String>) { let current_path = normalize(path.clone());
fn run(path: PathBuf, result: &mut Vec<String>) {
let current_path = normalize(path.clone());
result.push(format!("{}", current_path));
result.push(format!("{}", current_path.display()));
let resources: Vec<String> = deserialize(¤t_path.to_logical_path(root))
let resources: Vec<String> = deserialize(¤t_path)
.join_normalized(r);
.join(r);
run(root, next_path, result);
run(next_path, result);
run(&root, p.clone(), &mut result);
// Merge the current path with the input path. // If the input path is absolute it will overwrite // the current path. let mut path = root.clone(); path.push(p); run(path, &mut result);
// Merge the current path with the input path.
// If the input path is absolute it will overwrite
// the current path.
let mut path = root.clone();
path.push(p);
run(path, &mut result);