Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(shared): find versioned JetBrains macOS app bundles #16246

MergedSypher760-gif(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/16246/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 150 additions and 2 deletions.

x
0 of 2 viewed, 2 left
130 additions and 0 deletionsapps/server/src/process/externalLauncher.test.tsModified
View file
@@ -1041,6 +1041,136 @@
+// JetBrains Toolbox names its bundles after the app and the installed version
+// (`IntelliJ IDEA 2026.1.4.app`), so the darwin branch has to list the
+// Applications directories the way the win32 branch does instead of probing
+// exact `<name>.app` paths. The fixtures only use the mocked platform and a
+// temp directory, so this runs on a Windows host too.
+it.effect.each([
+ { editor: "webstorm", installPath: "Applications/WebStorm 2026.2.app/Contents/MacOS/webstorm" },
+ { editor: "idea", installPath: "Applications/IntelliJ IDEA 2026.1.4.app/Contents/MacOS/idea" },
+] as const)(
+ "discovers and launches $editor from a versioned macOS bundle",
+ ({ editor, installPath }) =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const home = yield* fs.makeTempDirectoryScoped({ prefix: "t3-editor-versioned-" });
+ const executable = path.join(home, installPath);
+ yield* fs.makeDirectory(path.dirname(executable), { recursive: true });
+ yield* fs.writeFileString(executable, "#!/bin/sh\n");
+ yield* fs.chmod(executable, 0o755);
+​
+ let spawned: ChildProcess.StandardCommand | undefined;
+ yield* Effect.gen(function* () {
+ const launcher = yield* ExternalLauncher.ExternalLauncher;
+ assert.include(yield* launcher.resolveAvailableEditors(), editor);
+ yield* launcher.launchEditor({ editor, cwd: "/workspace with spaces/file.ts:12:4" });
+ }).pipe(