megit-app 0.4.1 → 0.5.1

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.
@@ -1,21 +0,0 @@
1
- // node-pty ships spawn-helper as a prebuilt binary, and some package managers drop
2
- // the executable bit when extracting the tarball — the terminal then fails to spawn.
3
- // Resolve node-pty rather than guessing ./node_modules: under `npx` it is hoisted to
4
- // the installing project's node_modules, not ours.
5
- import { chmodSync, readdirSync } from 'node:fs'
6
- import { createRequire } from 'node:module'
7
- import { dirname, join } from 'node:path'
8
-
9
- try {
10
- const require = createRequire(import.meta.url)
11
- const prebuilds = join(dirname(require.resolve('node-pty/package.json')), 'prebuilds')
12
- for (const platform of readdirSync(prebuilds)) {
13
- try {
14
- chmodSync(join(prebuilds, platform, 'spawn-helper'), 0o755)
15
- } catch {
16
- // win32 prebuilds have no spawn-helper; nothing to do
17
- }
18
- }
19
- } catch {
20
- // node-pty is optional — absent on Linux installs without build tools
21
- }