diff --git a/.changeset/late-badgers-do.md b/.changeset/late-badgers-do.md new file mode 100644 index 0000000000..56bff9b376 --- /dev/null +++ b/.changeset/late-badgers-do.md @@ -0,0 +1,6 @@ +--- +"@medusajs/client-types": patch +"@medusajs/medusa-oas-cli": patch +--- + +Add separator after tmpdir base diff --git a/packages/generated/client-types/scripts/build.ts b/packages/generated/client-types/scripts/build.ts index df7bb096f2..30b4435560 100644 --- a/packages/generated/client-types/scripts/build.ts +++ b/packages/generated/client-types/scripts/build.ts @@ -2,6 +2,7 @@ import execa from "execa" import os from "os" import fs from "fs/promises" import path from "path" +import { sep } from "path" const basePath = path.resolve(__dirname, `../`) @@ -51,7 +52,7 @@ const getTmpDirectory = async () => { * RUNNER_TEMP: GitHub action, the path to a temporary directory on the runner. */ const tmpDir = process.env["RUNNER_TEMP"] ?? os.tmpdir() - return await fs.mkdtemp(tmpDir) + return await fs.mkdtemp(`${tmpDir}${sep}`) } void (async () => { diff --git a/packages/oas/medusa-oas-cli/src/utils/fs-utils.ts b/packages/oas/medusa-oas-cli/src/utils/fs-utils.ts index 65c866676c..e7f19a1dd2 100644 --- a/packages/oas/medusa-oas-cli/src/utils/fs-utils.ts +++ b/packages/oas/medusa-oas-cli/src/utils/fs-utils.ts @@ -1,5 +1,6 @@ import { access, lstat, mkdtemp } from "fs/promises" import path from "path" +import { sep } from "path" import { tmpdir } from "os" export async function isFile(filePath: string): Promise { @@ -25,5 +26,5 @@ export const getTmpDirectory = async () => { * RUNNER_TEMP: GitHub action, the path to a temporary directory on the runner. */ const tmpDir = process.env["RUNNER_TEMP"] ?? tmpdir() - return await mkdtemp(tmpDir) + return await mkdtemp(`${tmpDir}${sep}`) }