Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
diptanu committed Feb 14, 2024
1 parent 806d325 commit 5ca88b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/cmd/init_compose.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use clap::Args as ClapArgs;
use askama::Template;
use clap::Args as ClapArgs;

use super::GlobalArgs;


#[derive(Template)]
#[template(path = "docker_compose.yaml.jinja2")]
struct DockerComposeTemplate {
// Add fields here when we templatize this
// Add fields here when we templatize this
}

#[derive(Debug, ClapArgs)]
Expand All @@ -25,7 +24,6 @@ impl Args {
let prefix = path.parent().expect("failed to get parent directory");
std::fs::create_dir_all(prefix).expect("failed to create parent directory");


let template = DockerComposeTemplate {};
let compose_file = template.render().unwrap();
std::fs::write(&path, compose_file).expect("failed to write docker-compose file");
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use clap::{Args, Parser, Subcommand};

mod coordinator;
mod init_compose;
mod init_config;
mod server;
mod init_compose;

/// Global arguments for the CLI. These are arguments that are shared across all
/// subcommands.
Expand Down

0 comments on commit 5ca88b5

Please sign in to comment.