-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command for Registry_list #50
Open
hannydevelop
wants to merge
5
commits into
old-main
Choose a base branch
from
ukpai/registry_list
base: old-main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
56e50d6
registry_list command ready for review
hannydevelop 5a11c32
ran fmt and clippy
hannydevelop 152bce1
Merge branch 'main' into ukpai/registry_list
hannydevelop 99dae4c
merge main
hannydevelop adbb8c5
removed ibc from registry list
hannydevelop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,28 @@ | ||
use crate::prelude::*; | ||
use abscissa_core::{Command, Runnable}; | ||
use clap::Parser; | ||
|
||
#[derive(Command, Debug, Parser)] | ||
pub struct RegistryListCmd {} | ||
|
||
impl Runnable for RegistryListCmd { | ||
/// List all chains in local config file | ||
fn run(&self) { | ||
abscissa_tokio::run(&APP, async { | ||
match ocular::chain::registry::list_chains().await { | ||
Ok(info) => { | ||
let info = serde_json::to_string_pretty(&info).unwrap_or_else(|err| { | ||
status_err!("Can't convert chain info to JSON: {}", err); | ||
std::process::exit(1); | ||
}); | ||
print!("{}", info) | ||
} | ||
Err(err) => error!("{}", err), | ||
} | ||
}) | ||
.unwrap_or_else(|e| { | ||
status_err!("executor exited with error: {}", e); | ||
std::process::exit(1); | ||
}); | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things: the
_IBC
directory is included in the list but it's not a chain; we need to filter it out. Also, could we format it like you did with the other list command where it doesn't show up inside of JSON brackets (and without quotes)? currently it looks like:vs.