fix: Sync repos before listing apps
This commit is contained in:
parent
edbab404e9
commit
52a3be2846
16
src/main.rs
16
src/main.rs
@ -88,19 +88,12 @@ fn main() {
|
||||
let args = Args::parse();
|
||||
let mut result: Vec<ExecResult> = Vec::new();
|
||||
|
||||
let charts = match args.kind {
|
||||
Kinds::Argo => Argo::init().get_app(),
|
||||
Kinds::Helm => Helm::init().get_app(),
|
||||
Kinds::Helmfile => Helmfile::init(args.path.clone(), args.helmfile_environment.clone()).get_app(),
|
||||
}
|
||||
.unwrap();
|
||||
|
||||
if !args.no_sync {
|
||||
info!("syncing helm repositories");
|
||||
let res = match args.kind {
|
||||
Kinds::Argo => Argo::init().sync_repos(),
|
||||
Kinds::Helm => Helm::init().sync_repos(),
|
||||
Kinds::Helmfile => Helmfile::init(args.path, args.helmfile_environment).sync_repos(),
|
||||
Kinds::Helmfile => Helmfile::init(args.path.clone(), args.helmfile_environment.clone()).sync_repos(),
|
||||
};
|
||||
match res {
|
||||
Ok(_) => info!("helm repos are synced"),
|
||||
@ -108,6 +101,13 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
let charts = match args.kind {
|
||||
Kinds::Argo => Argo::init().get_app(),
|
||||
Kinds::Helm => Helm::init().get_app(),
|
||||
Kinds::Helmfile => Helmfile::init(args.path.clone(), args.helmfile_environment.clone()).get_app(),
|
||||
}
|
||||
.unwrap();
|
||||
|
||||
charts.iter().for_each(|a| {
|
||||
debug!("{:?}", a);
|
||||
check_chart(&mut result, a).unwrap();
|
||||
|
Reference in New Issue
Block a user