Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(shared): hydrate Nushell environments in CLI and desktop #7894

MergedSerendeep(GitHub profile, opens in a new tab)merged 16 commits intomain fromrefs/pull/7894/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 141 additions and 18 deletions (loading 1).

x
0 of 4 viewed, 4 left
75 additions and 0 deletionsapps/desktop/src/shell/DesktopShellEnvironment.test.tsModified
View file
@@ -1,3 +1,4 @@
+// @effect-diagnostics nodeBuiltinImport:off -- The process fixture runs real shell commands with isolated config files.
import * as NodeServices from "@effect/platform-node/NodeServices";
import * as Clock from "effect/Clock";
import { assert, describe, it } from "@effect/vitest";
@@ -12,8 +13,11 @@
import * as Stream from "effect/Stream";
import * as ChildProcess from "effect/process/ChildProcess";
import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner";
+import * as NodeChildProcess from "node:child_process";
+import * as NodeFS from "node:fs";
import * as TestClock from "effect/testing/TestClock";
import * as NodeOS from "node:os";
+import * as NodePath from "node:path";
import { vi } from "vite-plus/test";
​
import * as DesktopEnvironment from "../app/DesktopEnvironment.ts";
@@ -130,6 +134,77 @@
​
describe("DesktopShellEnvironment", () => {
+ // Explicit opt-in keeps real shell coverage independent of globally installed tools.
+ it.effect.runIf(process.env.T3_TEST_NU_PATH !== undefined)(
+ "hydrates the desktop through a renamed Nushell symlink with native export conversions",
+ () =>
+ Effect.gen(function* () {
+ const home = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-desktop-nu-"));
+ try {
+ const toolPath = NodePath.join(home, "nu tools", "bin");