mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 22:03:45 +00:00
fix: theme loading when installed via mise (fixes #681)
mise flattens tarball structure, placing theme files at root instead of theme/. Fall back to root directory if theme/ subdirectory doesn't exist.
This commit is contained in:
parent
843f235251
commit
d2f15f9ebb
2 changed files with 8 additions and 1 deletions
|
|
@ -52,7 +52,13 @@ export function getPackageDir(): string {
|
|||
*/
|
||||
export function getThemesDir(): string {
|
||||
if (isBunBinary) {
|
||||
return join(dirname(process.execPath), "theme");
|
||||
const execDir = dirname(process.execPath);
|
||||
const themeDir = join(execDir, "theme");
|
||||
// Fall back to root if theme/ doesn't exist (mise flattens directory structure)
|
||||
if (existsSync(themeDir)) {
|
||||
return themeDir;
|
||||
}
|
||||
return execDir;
|
||||
}
|
||||
// Theme is in modes/interactive/theme/ relative to src/ or dist/
|
||||
const packageDir = getPackageDir();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue