Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): run the Azure CLI in UTF-8 on Windows #25801

MergedPHSebastiao(GitHub profile, opens in a new tab)merged 12 commits intomain fromrefs/pull/25801/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 131 additions and 2 deletions (loading 1).

x
0 of 4 viewed, 4 left
50 additions and 0 deletionspackages/source-control-azure-devops/src/server/AzureDevOpsCli.test.tsModified
View file
@@ -9,6 +9,9 @@
​
import type * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
import * as TestSourceControlHost from "@t3tools/source-control-testing/TestSourceControlHost";
+import * as HostProcess from "@t3tools/shared/HostProcess";
+import { SpawnExecutableResolution } from "@t3tools/shared/shell";
+import { AzureCliInstallLocation, type AzureCliInstall } from "./azureCliLauncher.ts";
import * as AzureDevOpsCli from "./AzureDevOpsCli.ts";
​
const processOutput = (stdout: string): SourceControlHost.SourceControlProcessOutput => ({
@@ -21,9 +24,11 @@
​
const mockRun = vi.fn<SourceControlHost.SourceControlHost["Service"]["process"]["run"]>();
​
+// The CLI layer is exercised on a host that spawns `az` itself, so the launcher upgrade stays out of these assertions.
const layerSupport = Layer.mergeAll(
TestSourceControlHost.layer({ process: { run: mockRun } }),
NodeServices.layer,
+ Layer.succeed(HostProcess.Platform, "linux"),
);
const layer = Layer.mergeAll(AzureDevOpsCli.layer.pipe(Layer.provide(layerSupport)), layerSupport);
​
@@ -345,3 +350,48 @@
}).pipe(Effect.provide(layer)),
});
+​
+describe("azureCliInvocation", () => {