From 4b93d76290447cd3c2f9a2aa29e3e3fcc1cccab2 Mon Sep 17 00:00:00 2001 From: Jeff Charles Date: Tue, 3 Dec 2024 12:08:17 -0500 Subject: [PATCH] Set override flag when moving downloaded binary --- .changeset/khaki-glasses-wave.md | 5 +++++ packages/app/src/cli/services/function/binaries.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/khaki-glasses-wave.md diff --git a/.changeset/khaki-glasses-wave.md b/.changeset/khaki-glasses-wave.md new file mode 100644 index 00000000000..cfcde85d32c --- /dev/null +++ b/.changeset/khaki-glasses-wave.md @@ -0,0 +1,5 @@ +--- +'@shopify/app': patch +--- + +Fix error when downloading Javy plugin in parallel diff --git a/packages/app/src/cli/services/function/binaries.ts b/packages/app/src/cli/services/function/binaries.ts index 034d28e18f3..153e143f427 100644 --- a/packages/app/src/cli/services/function/binaries.ts +++ b/packages/app/src/cli/services/function/binaries.ts @@ -164,7 +164,7 @@ export async function downloadBinary(bin: DownloadableBinary) { const outputStream = createFileWriteStream(tmpFile) await bin.processResponse(responseStream, outputStream) await chmod(tmpFile, 0o775) - await moveFile(tmpFile, bin.path) + await moveFile(tmpFile, bin.path, {overwrite: true}) }) }, async () => {},