fix: Require a repo in repo view command

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-07-01 12:47:03 +00:00
parent 7d700602ef
commit 4cc01668fd

View File

@@ -44,10 +44,10 @@ impl CommandRunner for ViewArgs {
const NEED_SIGNER: bool = false; const NEED_SIGNER: bool = false;
async fn run(self, options: CliOptions) -> N34Result<()> { async fn run(self, options: CliOptions) -> N34Result<()> {
let naddrs = utils::naddrs_or_file( let naddrs = utils::check_empty_naddrs(utils::naddrs_or_file(
self.naddrs.flat_naddrs(&options.config.sets)?, self.naddrs.flat_naddrs(&options.config.sets)?,
&utils::nostr_address_path()?, &utils::nostr_address_path()?,
)?; )?)?;
let relays = options.relays.clone().flat_relays(&options.config.sets)?; let relays = options.relays.clone().flat_relays(&options.config.sets)?;
let client = NostrClient::init(&options, &relays).await; let client = NostrClient::init(&options, &relays).await;
client.add_relays(&naddrs.extract_relays()).await; client.add_relays(&naddrs.extract_relays()).await;