electrobun 0.0.19-beta.114 → 0.0.19-beta.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/bun/core/Updater.ts +4 -3
- package/package.json +1 -1
- package/src/cli/index.ts +5 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { join, dirname, resolve, basename } from "path";
|
|
1
|
+
import { join, dirname, resolve, basename, relative } from "path";
|
|
2
2
|
import { homedir } from "os";
|
|
3
3
|
import { renameSync, unlinkSync, mkdirSync, rmdirSync, statSync, readdirSync, cpSync } from "fs";
|
|
4
4
|
import { execSync } from "child_process";
|
|
@@ -379,9 +379,10 @@ const Updater = {
|
|
|
379
379
|
if (currentOS === 'win') {
|
|
380
380
|
console.log(`Using Windows native tar.exe to extract ${latestTarPath} to ${extractionDir}...`);
|
|
381
381
|
try {
|
|
382
|
-
|
|
382
|
+
const relativeTarPath = relative(extractionDir, latestTarPath);
|
|
383
|
+
execSync(`tar -xf "${relativeTarPath}"`, {
|
|
383
384
|
stdio: 'inherit',
|
|
384
|
-
cwd: extractionDir
|
|
385
|
+
cwd: extractionDir
|
|
385
386
|
});
|
|
386
387
|
console.log('Windows tar.exe extraction completed successfully');
|
|
387
388
|
|
package/package.json
CHANGED
package/src/cli/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { join, dirname, basename } from "path";
|
|
1
|
+
import { join, dirname, basename, relative } from "path";
|
|
2
2
|
import {
|
|
3
3
|
existsSync,
|
|
4
4
|
readFileSync,
|
|
@@ -192,7 +192,8 @@ async function ensureCoreDependencies(targetOS?: 'macos' | 'win' | 'linux', targ
|
|
|
192
192
|
// Use Windows native tar.exe on Windows due to npm tar library issues
|
|
193
193
|
if (OS === 'win') {
|
|
194
194
|
console.log('Using Windows native tar.exe for reliable extraction...');
|
|
195
|
-
|
|
195
|
+
const relativeTempFile = relative(platformDistPath, tempFile);
|
|
196
|
+
execSync(`tar -xf "${relativeTempFile}"`, {
|
|
196
197
|
stdio: 'inherit',
|
|
197
198
|
cwd: platformDistPath
|
|
198
199
|
});
|
|
@@ -333,7 +334,8 @@ async function ensureCEFDependencies(targetOS?: 'macos' | 'win' | 'linux', targe
|
|
|
333
334
|
// Use Windows native tar.exe on Windows due to npm tar library issues
|
|
334
335
|
if (OS === 'win') {
|
|
335
336
|
console.log('Using Windows native tar.exe for reliable extraction...');
|
|
336
|
-
|
|
337
|
+
const relativeTempFile = relative(platformDistPath, tempFile);
|
|
338
|
+
execSync(`tar -xf "${relativeTempFile}"`, {
|
|
337
339
|
stdio: 'inherit',
|
|
338
340
|
cwd: platformDistPath
|
|
339
341
|
});
|