Skip to content

Commit d18c1b8

Browse files
anandgupta42claude
andcommitted
fix: use path.join for all display paths in dbt profiles tool
Build the full default path via `join(homedir(), ".dbt", "profiles.yml")` so display strings render correct OS separators on Windows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 03fb39c commit d18c1b8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/opencode/src/altimate/tools/dbt-profiles.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import { Tool } from "../../tool/tool"
55
import { Dispatcher } from "../native"
66
import { isSensitiveField } from "../native/connections/credential-store"
77

8-
const DEFAULT_DBT_DIR = join(homedir(), ".dbt")
8+
const DEFAULT_DBT_PROFILES = join(homedir(), ".dbt", "profiles.yml")
99

1010
export const DbtProfilesTool = Tool.define("dbt_profiles", {
1111
description:
12-
`Discover dbt profiles from profiles.yml and map them to warehouse connections. Auto-detects Snowflake, BigQuery, Databricks, Postgres, Redshift, MySQL, DuckDB configurations. Searches: explicit path > DBT_PROFILES_DIR env var > project-local profiles.yml > ${DEFAULT_DBT_DIR}/profiles.yml.`,
12+
`Discover dbt profiles from profiles.yml and map them to warehouse connections. Auto-detects Snowflake, BigQuery, Databricks, Postgres, Redshift, MySQL, DuckDB configurations. Searches: explicit path > DBT_PROFILES_DIR env var > project-local profiles.yml > ${DEFAULT_DBT_PROFILES}.`,
1313
parameters: z.object({
14-
path: z.string().optional().describe(`Explicit path to profiles.yml. If omitted, checks DBT_PROFILES_DIR, then project directory, then ${DEFAULT_DBT_DIR}/profiles.yml`),
14+
path: z.string().optional().describe(`Explicit path to profiles.yml. If omitted, checks DBT_PROFILES_DIR, then project directory, then ${DEFAULT_DBT_PROFILES}`),
1515
projectDir: z.string().optional().describe("dbt project root directory. Used to find project-local profiles.yml next to dbt_project.yml"),
1616
}),
1717
async execute(args, ctx) {
@@ -34,7 +34,7 @@ export const DbtProfilesTool = Tool.define("dbt_profiles", {
3434
return {
3535
title: "dbt Profiles: No connections found",
3636
metadata: { success: true, connection_count: 0 },
37-
output: `No dbt profiles found. Ensure profiles.yml exists in your project directory, DBT_PROFILES_DIR, or ${DEFAULT_DBT_DIR}/.`,
37+
output: `No dbt profiles found. Ensure profiles.yml exists in your project directory, DBT_PROFILES_DIR, or ${DEFAULT_DBT_PROFILES}.`,
3838
}
3939
}
4040

0 commit comments

Comments
 (0)