Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): restore Windows file-manager actions #12393

ClosedMatthewFeroz(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/12393/headopened View on GitHub

Showing 2 changed files with 88 additions and 9 deletions.

x
0 of 2 viewed, 2 left
71 additions and 0 deletionsapps/server/src/process/externalLauncher.test.tsModified
View file
@@ -339,9 +339,80 @@
"$ProgressPreference = 'SilentlyContinue'; Start-Process 'explorer.exe' -ArgumentList ('/select,\"' + 'C:\\workspace with spaces\\media\\author''s clip.mp4' + '\"')",
assert.equal(spawned.options.shell, false);
+​
+ yield* Effect.gen(function* () {
+ const launcher = yield* ExternalLauncher.ExternalLauncher;
+ yield* launcher.launchEditor({
+ editor: "file-manager",
+ cwd: "C:/workspace with spaces/media/author's clip.mp4",
+ });
+ }).pipe(
+ Effect.provide(
+ testLayer({
+ platform: "win32",
+ env: { PATH: binDir, PATHEXT: ".COM;.EXE;.BAT;.CMD" },
+ onSpawn: (command) => {
+ spawned = command;
+ },
+ }),
+ ),
+ );
+ assert.deepEqual(spawned.args, ["C:\\workspace with spaces\\media\\author's clip.mp4"]);
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
​
+it.effect.skipIf(!windowsHost)(
+ "executes the Windows reveal helper with the launcher's process options",
+ () =>
+ Effect.gen(function* () {