Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/cli/config/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use clap::ValueHint;
use eyre::Result;

use crate::config::{Settings, config_file};
use crate::file;
use crate::file::display_path;
use crate::{env, file};

/// [experimental] Generate a mise.toml file
#[derive(Debug, clap::Args)]
Expand Down Expand Up @@ -38,7 +38,8 @@ impl ConfigGenerate {
}

fn tool_versions(&self, tool_versions: &Path) -> Result<String> {
let to = config_file::parse_or_init(&PathBuf::from("mise.toml"))?;
let to =
config_file::parse_or_init(&PathBuf::from(env::MISE_DEFAULT_CONFIG_FILENAME.clone()))?;
Comment thread
risu729 marked this conversation as resolved.
Outdated
let from = config_file::parse(tool_versions)?;
let tools = from.to_tool_request_set()?.tools;
for (ba, tools) in tools {
Expand Down
2 changes: 1 addition & 1 deletion src/config/config_file/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ fn init(path: &Path) -> Arc<dyn ConfigFile> {

pub fn parse_or_init(path: &Path) -> eyre::Result<Arc<dyn ConfigFile>> {
let path = if path.is_dir() {
path.join("mise.toml")
path.join(env::MISE_DEFAULT_CONFIG_FILENAME.clone())
Comment thread
risu729 marked this conversation as resolved.
Outdated
} else {
path.into()
};
Expand Down
Loading