@centralu/win32-x64 0.1.0-beta.26 → 0.1.0-beta.27

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.
@@ -264,15 +264,15 @@ export async function install(p, { dataDir = process.env.CC_DATA_DIR || join(hom
264
264
  const partial = join(l.root, `.partial-${p.version}-${process.pid}`)
265
265
  rmSync(partial, { recursive: true, force: true })
266
266
  try {
267
- for (const [i, pkg] of p.packages.entries()) {
267
+ for (const pkg of p.packages) {
268
268
  const bytes = await fetchChecked(pkg)
269
- const file = join(partial, `${i}.tgz`)
270
269
  const dest = join(partial, 'node_modules', ...pkg.name.split('/'))
271
270
  mkdirSync(dest, { recursive: true })
272
- writeFileSync(file, bytes)
273
- const r = spawnSync(tarProgram(), ['-xzf', file, '-C', dest, '--strip-components', '1'], { encoding: 'utf8', windowsHide: true })
271
+ // No path among the arguments (#849): Windows' tar takes its arguments in the ANSI code page, so a profile
272
+ // folder outside it (a name in another script) reached it as "?????" and the unpack failed. The archive comes
273
+ // on stdin, and the destination is the working folder, which Windows hands over whole
274
+ const r = spawnSync(tarProgram(), ['-xzf', '-', '--strip-components', '1'], { cwd: dest, input: bytes, encoding: 'utf8', windowsHide: true, maxBuffer: 16 * 1024 * 1024 })
274
275
  if (r.status !== 0) throw new Refusal('unpack', `${pkg.name}: ${(r.stderr || r.error?.message || '').trim().split('\n').at(-1)}`)
275
- rmSync(file, { force: true })
276
276
  }
277
277
  const pkgDir = join(partial, 'node_modules', ...parts.pkg.split('/'))
278
278
  if (!existsSync(join(pkgDir, parts.host))) throw new Refusal('no_host', p.platform)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centralu/win32-x64",
3
- "version": "0.1.0-beta.26",
3
+ "version": "0.1.0-beta.27",
4
4
  "description": "Centralu app folder for Windows on x86-64",
5
5
  "license": "MIT",
6
6
  "author": "ijun17",