Skip to content

Commit

Permalink
Fix default project toml path with feature gate (#1419)
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix authored Dec 4, 2024
1 parent e18c1ea commit 9006c31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/branding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ pub const BRANDING_SCHEMA_FILE_EXT: &str = if cfg!(feature = "gel") {
pub const BRANDING_WSL: &str = "EdgeDB.WSL.1";

/// The display name for the configuration file.
pub const CONFIG_FILE_DISPLAY_NAME: &str = "`gel.toml` (or `edgedb.toml`)";
pub const CONFIG_FILE_DISPLAY_NAME: &str = if cfg!(feature = "gel") {
"`gel.toml` (or `edgedb.toml`)"
} else {
"`edgedb.toml`"
};

/// The default query tag for server statistics.
pub const QUERY_TAG: &str = "gel/cli";
Expand Down
6 changes: 5 additions & 1 deletion src/portable/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,11 @@ pub fn init(options: &Init, opts: &crate::options::Options) -> anyhow::Result<()
.project_dir
.clone()
.unwrap_or_else(|| env::current_dir().unwrap());
let config_path = dir.join(PROJECT_FILES[0]);
let config_path = dir.join(if cfg!(feature = "gel") {
PROJECT_FILES[0]
} else {
PROJECT_FILES[1]
});
init_new(options, &dir, config_path, opts)?;
return Ok(());
};
Expand Down

0 comments on commit 9006c31

Please sign in to comment.