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

@ -108,9 +108,10 @@ jobs:
# Create archives # Create archives
cd binaries cd binaries
# Unix platforms (tar.gz) # Unix platforms (tar.gz) - use wrapper directory for mise compatibility
# mise auto-detects single-directory archives and strips one component
for platform in darwin-arm64 darwin-x64 linux-x64 linux-arm64; do for platform in darwin-arm64 darwin-x64 linux-x64 linux-arm64; do
tar -czf pi-$platform.tar.gz -C $platform . mv $platform pi && tar -czf pi-$platform.tar.gz pi && mv pi $platform
done done
# Windows (zip) # Windows (zip)

View file

@ -20,7 +20,7 @@
- Fix API key resolution after model switches by using provider argument ([#691](https://github.com/badlogic/pi-mono/pull/691) by [@joshp123](https://github.com/joshp123)) - Fix API key resolution after model switches by using provider argument ([#691](https://github.com/badlogic/pi-mono/pull/691) by [@joshp123](https://github.com/joshp123))
- Fixed z.ai thinking/reasoning: thinking toggle now correctly enables/disables thinking for z.ai models ([#688](https://github.com/badlogic/pi-mono/issues/688)) - Fixed z.ai thinking/reasoning: thinking toggle now correctly enables/disables thinking for z.ai models ([#688](https://github.com/badlogic/pi-mono/issues/688))
- Fixed extension loading in compiled Bun binary: extensions with local file imports now work correctly. Updated `@mariozechner/jiti` to v2.6.5 which bundles babel for Bun binary compatibility. ([#681](https://github.com/badlogic/pi-mono/issues/681)) - Fixed extension loading in compiled Bun binary: extensions with local file imports now work correctly. Updated `@mariozechner/jiti` to v2.6.5 which bundles babel for Bun binary compatibility. ([#681](https://github.com/badlogic/pi-mono/issues/681))
- Fixed theme loading when installed via mise: fallback to root directory if `theme/` subdirectory doesn't exist (mise flattens tarball structure). ([#681](https://github.com/badlogic/pi-mono/issues/681)) - Fixed theme loading when installed via mise: use wrapper directory in release tarballs for compatibility with mise's `strip_components=1` extraction. ([#681](https://github.com/badlogic/pi-mono/issues/681))
## [0.45.3] - 2026-01-13 ## [0.45.3] - 2026-01-13

View file

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