Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Reveal in File Explorer opens a window on Windows again #19090

Closedtrevoedwards(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/19090/headopened View on GitHub

Showing 2 changed files with 16 additions and 6 deletions.

x
0 of 2 viewed, 2 left
2 additions and 0 deletionsapps/server/src/process/externalLauncher.test.tsModified
View file
@@ -341,6 +341,8 @@
"$ProgressPreference = 'SilentlyContinue'; Start-Process 'explorer.exe' -ArgumentList ('/select,\"' + 'C:\\workspace with spaces\\media\\author''s clip.mp4' + '\"')",
assert.equal(spawned.options.shell, false);
+ // Detached, PowerShell exits without ever starting Explorer.
+ assert.equal(spawned.options.detached, false);
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
​
14 additions and 6 deletionsapps/server/src/process/externalLauncher.tsModified
View file
@@ -62,6 +62,8 @@
readonly target: string;
readonly command: string;
readonly args: ReadonlyArray<string>;
+ /** Defaults to detached; see the native Windows reveal for the exception. */
+ readonly detached?: boolean;
​
interface ProcessLaunch {
@@ -636,11 +638,17 @@
​
if (platform === "win32") {
- return fileExplorerRevealLaunch(
- target,
- normalizeWindowsFileManagerPath(target),