Skip to content

Commit 5531ea9

Browse files
committed
Fix the command on windows
It still returns an empty string, though Signed-off-by: David Gageot <[email protected]>
1 parent aff520e commit 5531ea9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/extension/ui/src/utils/Files.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ export const getUser = async (client: v1.DockerDesktopClient) => {
4141
"-e",
4242
"USER",
4343
BUSYBOX,
44-
"/bin/echo",
45-
"$USER",
44+
"/bin/sh",
45+
"-c",
46+
client.host.platform === "win32"
47+
? `\"echo $USER\"`
48+
: `'echo $USER'`,
4649
]);
4750
user = result.trim();
4851
}

0 commit comments

Comments
 (0)