fix(medusa-oas-cli): Add separator after tmpdir base (#3924)

* add separator after tmpdir base

* Create late-badgers-do.md

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Lacey Pevey
2023-05-11 05:32:55 -05:00
committed by GitHub
parent 7963c16233
commit cfcd2d54fd
3 changed files with 10 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
---
"@medusajs/client-types": patch
"@medusajs/medusa-oas-cli": patch
---
Add separator after tmpdir base

View File

@@ -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 () => {

View File

@@ -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<boolean> {
@@ -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}`)
}