Skip to content

fix(terminal): load node-pty from app.asar on macOS, leave PATH alone - #665

Merged
flakronademi merged 1 commit into
devfrom
fix/terminal-failing-on-arm
Nov 19, 2026
Merged

flakronademi merged 1 commit into
devfrom
fix/terminal-failing-on-arm

Conversation

@ailegion

Copy link
Copy Markdown
Contributor

On packaged macOS builds node-pty already rewrites its spawn-helper path to app.asar.unpacked. Requiring it from the unpacked copy made that rewrite happen twice (app.asar.unpacked.unpacked), so no shell could be started. Keep the resolved path on macOS; Windows and Linux still load the unpacked copy.

Stop putting Studio's managed tools (python, dbt, rosetta) on the shell terminal's PATH, and drop the macOS login-shell wrapper that restored that order after path_helper. The terminal now starts with the PATH Studio received, like the terminal of any other editor.

On packaged macOS builds node-pty already rewrites its spawn-helper path
to app.asar.unpacked. Requiring it from the unpacked copy made that
rewrite happen twice (app.asar.unpacked.unpacked), so no shell could be
started. Keep the resolved path on macOS; Windows and Linux still load
the unpacked copy.

Stop putting Studio's managed tools (python, dbt, rosetta) on the shell
terminal's PATH, and drop the macOS login-shell wrapper that restored
that order after path_helper. The terminal now starts with the PATH
Studio received, like the terminal of any other editor.
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/main/ipcHandlers/pty.ipcHandlers.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Error while loading rule 'compat/compat': Cannot find module 'browserslist-config-erb'
Require stack:

  • /.eslint-tmp/node_modules/browserslist/node.js
  • /.eslint-tmp/node_modules/browserslist/index.js
  • /.eslint-tmp/node_modules/eslint-plugin-compat/lib/helpers.js
  • /.eslint-tmp/node_modules/eslint-plugin-compat/lib/rules/compat.js
  • /.eslint-tmp/node_modules/eslint-plugin-compat/lib/index.js
  • /.eslint-tmp/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
    Occurred while linting /src/main/ipcHandlers/pty.ipcHandlers.ts
    at Module._resolveFilename (node:internal/modules/cjs/loader:1564:15)
    at wrapResolveFilename (node:internal/modules/cjs/loader:1118:27)
    at defaultResolve (node:internal/modules/cjs/loader:1199:20)
    at nextStep (node:internal/modules/customization_hooks:189:26)
    at resolve (file:///.eslint-tmp/.coderabbit-resolver.mjs:11:14)
    at nextStep (node:internal/modules/customization_hooks:189:26)
    at resolveWithHooks (node:internal/modules/customization_hooks:417:10)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1212:25)
    at require.resolve (node:internal/modules/helpers:175:31)
    at Object.loadQueries (/.eslint-tmp/node_modules/browserslist/node.js:283:35)
src/main/services/pty.service.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Error while loading rule 'compat/compat': Cannot find module 'browserslist-config-erb'
Require stack:

  • /.eslint-tmp/node_modules/browserslist/node.js
  • /.eslint-tmp/node_modules/browserslist/index.js
  • /.eslint-tmp/node_modules/eslint-plugin-compat/lib/helpers.js
  • /.eslint-tmp/node_modules/eslint-plugin-compat/lib/rules/compat.js
  • /.eslint-tmp/node_modules/eslint-plugin-compat/lib/index.js
  • /.eslint-tmp/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
    Occurred while linting /src/main/services/pty.service.ts
    at Module._resolveFilename (node:internal/modules/cjs/loader:1564:15)
    at wrapResolveFilename (node:internal/modules/cjs/loader:1118:27)
    at defaultResolve (node:internal/modules/cjs/loader:1199:20)
    at nextStep (node:internal/modules/customization_hooks:189:26)
    at resolve (file:///.eslint-tmp/.coderabbit-resolver.mjs:11:14)
    at nextStep (node:internal/modules/customization_hooks:189:26)
    at resolveWithHooks (node:internal/modules/customization_hooks:417:10)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1212:25)
    at require.resolve (node:internal/modules/helpers:175:31)
    at Object.loadQueries (/.eslint-tmp/node_modules/browserslist/node.js:283:35)
src/main/utils/shellEnvironment.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Error while loading rule 'compat/compat': Cannot find module 'browserslist-config-erb'
Require stack:

  • /.eslint-tmp/node_modules/browserslist/node.js
  • /.eslint-tmp/node_modules/browserslist/index.js
  • /.eslint-tmp/node_modules/eslint-plugin-compat/lib/helpers.js
  • /.eslint-tmp/node_modules/eslint-plugin-compat/lib/rules/compat.js
  • /.eslint-tmp/node_modules/eslint-plugin-compat/lib/index.js
  • /.eslint-tmp/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
    Occurred while linting /src/main/utils/shellEnvironment.ts
    at Module._resolveFilename (node:internal/modules/cjs/loader:1564:15)
    at wrapResolveFilename (node:internal/modules/cjs/loader:1118:27)
    at defaultResolve (node:internal/modules/cjs/loader:1199:20)
    at nextStep (node:internal/modules/customization_hooks:189:26)
    at resolve (file:///.eslint-tmp/.coderabbit-resolver.mjs:11:14)
    at nextStep (node:internal/modules/customization_hooks:189:26)
    at resolveWithHooks (node:internal/modules/customization_hooks:417:10)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1212:25)
    at require.resolve (node:internal/modules/helpers:175:31)
    at Object.loadQueries (/.eslint-tmp/node_modules/browserslist/node.js:283:35)
  • 2 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@flakronademi
flakronademi merged commit e05fb1b into dev Nov 19, 2026
1 of 2 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to Shipped in Rosetta dbt Studio Roadmap Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants