fix: use wrapper directory in release tarballs for mise compatibility

mise auto-detects single-directory archives and extracts with strip_components=1.
Using a 'pi/' wrapper directory ensures the internal structure is preserved.

Reverts the code workaround (theme dir fallback) in favor of fixing the tarball.
This commit is contained in:
Mario Zechner 2026-01-13 21:33:32 +01:00
parent d2f15f9ebb
commit 13c4205dbb
3 changed files with 5 additions and 10 deletions

View file

@ -52,13 +52,7 @@ export function getPackageDir(): string {
*/
export function getThemesDir(): string {
if (isBunBinary) {
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;
return join(dirname(process.execPath), "theme");
}
// Theme is in modes/interactive/theme/ relative to src/ or dist/
const packageDir = getPackageDir();