Skip to content

Commit

Permalink
chore: backport original Cardano command (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Mar 25, 2024
1 parent 205e105 commit 284ea4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/cardano/connect_node_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn define_remote_host(args: &Args, ctx: &crate::core::Context) -> miette::Result

return Ok(format!(
"cardanonode-{}-n2c-{}.{}",
args.instance, ctx.project.name, ctx.operator.entrypoint,
args.instance, ctx.namespace.name, ctx.operator.entrypoint,
));
}

Expand Down Expand Up @@ -126,7 +126,7 @@ fn define_socket_path(
ctx: &crate::core::Context,
) -> miette::Result<PathBuf> {
let default = dirs
.ensure_tmp_dir(&ctx.project.name)?
.ensure_tmp_dir(&ctx.namespace.name)?
.join(format!("{}.socket", args.instance));

let path = args.socket.to_owned().unwrap_or(default);
Expand Down
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ use tracing::Level;
use tracing_indicatif::IndicatifLayer;
use tracing_subscriber::prelude::*;

mod cardano;
mod core;
mod dirs;
mod init;
mod pages;

// namespaces
mod r#use;

#[derive(Parser)]
#[command(author, version, about, long_about = None)]
#[command(propagate_version = true)]
Expand Down Expand Up @@ -47,6 +45,9 @@ pub enum Commands {

/// interact with Demeter Pages
Pages(pages::Args),

/// Cardano-specific commands
Cardano(cardano::Args),
}

pub struct Cli {
Expand Down Expand Up @@ -85,5 +86,6 @@ async fn main() -> miette::Result<()> {
match args.command {
Commands::Init(args) => init::run(args, &cli.dirs).await,
Commands::Pages(args) => pages::run(args, &cli).await,
Commands::Cardano(args) => cardano::run(args, &cli).await,
}
}

0 comments on commit 284ea4f

Please sign in to comment.