From 30cf0ef4c5c3d1a88cf9287862aba5dfbb30ba02 Mon Sep 17 00:00:00 2001 From: Chapman Pendery Date: Fri, 23 Jan 2026 13:54:54 -0800 Subject: [PATCH 1/2] fix: spawn-helper permissions on darwin Signed-off-by: Chapman Pendery --- src/commands/init.ts | 3 ++- src/ui/ui-reinit.ts | 3 ++- src/utils/node.ts | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/commands/init.ts b/src/commands/init.ts index ba1196d2..c74a9ed6 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -3,7 +3,7 @@ import { Command } from "commander"; import { createShellConfigs, initSupportedShells as shells, getShellSourceCommand, Shell } from "../utils/shell.js"; -import { unpackNativeModules, unpackShellFiles } from "../utils/node.js"; +import { permissionNativeModules, unpackNativeModules, unpackShellFiles } from "../utils/node.js"; import { render } from "../ui/ui-init.js"; const supportedShells = shells.join(", "); @@ -11,6 +11,7 @@ const supportedShells = shells.join(", "); const action = (program: Command) => async (shell: string | undefined) => { await createShellConfigs(); await unpackNativeModules(); + await permissionNativeModules(); await unpackShellFiles(); if (shell == null) { diff --git a/src/ui/ui-reinit.ts b/src/ui/ui-reinit.ts index 2acec4dc..55e6f254 100644 --- a/src/ui/ui-reinit.ts +++ b/src/ui/ui-reinit.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import chalk from "chalk"; -import { unpackNativeModules, unpackShellFiles } from "../utils/node.js"; +import { permissionNativeModules, unpackNativeModules, unpackShellFiles } from "../utils/node.js"; import { createShellConfigs } from "../utils/shell.js"; import { shellResourcesPath, nativeResourcesPath, loggingResourcesPath, initResourcesPath } from "../utils/constants.js"; import fs from "node:fs"; @@ -16,6 +16,7 @@ export const render = async () => { await createShellConfigs(); await unpackNativeModules(); + await permissionNativeModules(); await unpackShellFiles(); process.stdout.write(chalk.green("✓") + " successfully installed inshellisense \n"); }; diff --git a/src/utils/node.ts b/src/utils/node.ts index c893a442..d5f407ea 100644 --- a/src/utils/node.ts +++ b/src/utils/node.ts @@ -24,6 +24,15 @@ export const unpackNativeModules = async (): Promise => { ); }; +export const permissionNativeModules = async (): Promise => { + if (!sea.isSea()) return; + + const spawnHelper = path.join(nativeResourcesPath, "spawn-helper"); + if (fs.existsSync(spawnHelper)) { + await fsAsync.chmod(spawnHelper, 0o755); + } +} + export const unpackShellFiles = async (): Promise => { if (!sea.isSea()) { const shellFolderPath = path.join(process.cwd(), "shell"); From 9156f79ca1fffc2a0d58a15fc7ebad97a89a8f72 Mon Sep 17 00:00:00 2001 From: Chapman Pendery Date: Fri, 23 Jan 2026 13:58:33 -0800 Subject: [PATCH 2/2] fix: style Signed-off-by: Chapman Pendery --- src/utils/node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/node.ts b/src/utils/node.ts index d5f407ea..c80292fb 100644 --- a/src/utils/node.ts +++ b/src/utils/node.ts @@ -31,7 +31,7 @@ export const permissionNativeModules = async (): Promise => { if (fs.existsSync(spawnHelper)) { await fsAsync.chmod(spawnHelper, 0o755); } -} +}; export const unpackShellFiles = async (): Promise => { if (!sea.isSea()) {