Skip to content

Commit

Permalink
refactor: Use age_toml module to init workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Apr 4, 2024
1 parent 4119cb0 commit 338a7bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/commands/init.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::config;
use crate::config::age_toml;
use anyhow::{anyhow, Result};
use std::env::current_dir;
use std::fs::File;
use std::io::prelude::*;
use std::path::Path;

use clap::Args;
use tera::{Context, Tera};
Expand Down Expand Up @@ -41,7 +41,7 @@ pub(crate) fn execute(args: &Arguments) -> Result<()> {
if config::resolve_config(&pwd).is_ok() {
return Err(anyhow!("Configuration file is already exists."));
}
let target = current_dir()?.join(Path::new(config::DEFAULT_FILENAME));
let target = current_dir()?.join(age_toml::FILENAME);

let mut ctx = Context::new();
ctx.insert("current_version", "0.0.0");
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use semver::Version;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;

mod age_toml;
pub mod age_toml;
mod cargo_toml;
mod pyproject_toml;

Expand Down

0 comments on commit 338a7bd

Please sign in to comment.