Skip to content

Commit 2a7cdea

Browse files
committed
Make the code work on Mac and Windows
Signed-off-by: David Gageot <[email protected]>
1 parent c0f3c0e commit 2a7cdea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ export const writeToPromptsVolume = async (
8383
BUSYBOX,
8484
"/bin/sh",
8585
"-c",
86-
`'echo ${encode(content)} | base64 -d > ${filename}'`,
86+
client.host.platform === "win32"
87+
? `\"echo ${encode(content)} | base64 -d > ${filename}\"`
88+
: `'echo ${encode(content)} | base64 -d > ${filename}'`,
8789
]);
8890
};
8991

@@ -100,6 +102,8 @@ export const writeToMount = async (
100102
BUSYBOX,
101103
"/bin/sh",
102104
"-c",
103-
`'echo ${encode(content)} | base64 -d > ${filename}'`,
105+
client.host.platform === "win32"
106+
? `\"echo ${encode(content)} | base64 -d > ${filename}\"`
107+
: `'echo ${encode(content)} | base64 -d > ${filename}'`,
104108
]);
105109
};

0 commit comments

Comments
 (0)