feat(automations): run a node in WSL — Ubuntu with its own Docker, say - #15
Merged
3 commits merged intoSep 26, 2026
Merged
3 commits merged into
3 commits merged into
Conversation
Where a node runs is now "local | WSL | on host". WSL runs the snippet with bash in a chosen distribution (or the default one) on this machine, so Linux commands and a Docker installed inside WSL work in automations; no host parameter needed. The option shows where wsl.exe lists a distribution (Docker Desktop's internal ones left out), and stays on a node that already uses it. The command goes over as an environment variable shared through WSLENV and runs as `wsl.exe -d <distro> --exec bash -lc 'eval "$BSSH_COMMAND"'`: nothing in it is re-parsed by Windows or an extra shell (`--` would, and lost the quotes). It starts in the Windows home folder (/mnt/c/Users/<you>), where local nodes run and an upload node's relative path points, so the steps hand files to each other. wsl.exe's own failures (no such distribution) come back as its message rather than an exit code of 4294967295. Stored as target = "wsl" plus wslDistro; export and import carry both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r shell A "Local terminal" row under Terminal opens a shell on this computer in a tab, no SSH needed, picked from the shells found here the way VS Code's terminal offers them: PowerShell 7, Windows PowerShell, Command Prompt, Git Bash and every WSL distribution on Windows (Docker Desktop's internal ones left out); the login shell and the other installed ones on macOS and Linux. Tabs start in the home folder (a WSL one in the distribution's home) and close when the shell exits. Backed by node-pty, as VS Code is, so full-screen programs and line editing work. LocalPtyManager mirrors the SSH PtyManager — same session ids, output channel and exit event — so the existing terminal view drives both; write/resize/close go to whichever manager has the id. node-pty loads on first use: where it can't, only local terminals are affected, with a message saying so. Packaging: node-pty is N-API with prebuilt binaries (built on install on Linux), so it needs no rebuild for Electron, and electron-builder's rebuild would send it to node-gyp. That rebuild is off; build/rebuild-native.cjs does the same rebuild in beforePack with node-pty left out. node-pty's folder is unpacked from the asar for its helper programs. Its install script is approved for npm's allowScripts. Also: output and events are no longer sent to a destroyed window — a shell still talking while the app quit raised "Object has been destroyed" in the main process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Local terminals failed on macOS with "posix_spawnp failed": node-pty starts every shell through its spawn-helper, and node-pty 1.1.0's npm package ships that file as -rw-r--r--. The app now sets the executable bit where it is missing before loading node-pty (development, CI), and the packaging hook sets it before the files are copied, so the macOS app ships it executable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Where a node runs is now "local | WSL | on host". WSL runs the snippet with bash
in a chosen distribution (or the default one) on this machine, so Linux commands
and a Docker installed inside WSL work in automations; no host parameter needed.
The option shows where wsl.exe lists a distribution (Docker Desktop's internal
ones left out), and stays on a node that already uses it.
The command goes over as an environment variable shared through WSLENV and runs
as
wsl.exe -d <distro> --exec bash -lc 'eval "$BSSH_COMMAND"': nothing in it isre-parsed by Windows or an extra shell (
--would, and lost the quotes). Itstarts in the Windows home folder (/mnt/c/Users/), where local nodes run and
an upload node's relative path points, so the steps hand files to each other.
wsl.exe's own failures (no such distribution) come back as its message rather
than an exit code of 4294967295.
Stored as target = "wsl" plus wslDistro; export and import carry both.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
What and why
How it was tested
Checklist
npm run checkandnpm testpass