Skip to content

Commit c842c08

Browse files
committed
fix: normalize all path functions in constants.ts for Windows
1 parent 6fc0e0b commit c842c08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/utils/constants.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ export const PROJECT_CONFIG_DIR = '.opencode';
7676
* Get configuration directory for a given scope
7777
*/
7878
export function getConfigDir(scope: ConfigScope): string {
79-
return scope === 'global' ? GLOBAL_CONFIG_DIR : PROJECT_CONFIG_DIR;
79+
const dir = scope === 'global' ? GLOBAL_CONFIG_DIR : PROJECT_CONFIG_DIR;
80+
return dir.replace(/\\/g, '/');
8081
}
8182

8283
/**
@@ -87,7 +88,8 @@ export function getConfigPath(
8788
type: ConfigType,
8889
namespace: NamespaceType
8990
): string {
90-
return path.join(getConfigDir(scope), type, namespace);
91+
const configPath = path.join(getConfigDir(scope), type, namespace);
92+
return configPath.replace(/\\/g, '/');
9193
}
9294

9395
/**

0 commit comments

Comments
 (0)