Fix to properly create folder

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2025-06-02 14:21:48 +07:00
parent 8d56fe5df6
commit e0c13e85b4
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2

View File

@ -111,7 +111,7 @@ import { getToolToken, getWorkspace, getWorkspaceTransactorEndpoint } from './ut
import { createRestClient } from '@hcengineering/api-client'
import { mkdir, writeFile } from 'fs/promises'
import { basename } from 'path'
import { basename, dirname } from 'path'
import { existsSync } from 'fs'
const colorConstants = {
@ -1700,7 +1700,7 @@ export function devTool (
method: 'PUT'
})
if (resp.ok) {
const bdir = basename(opt.output)
const bdir = dirname(opt.output)
if (!existsSync(bdir)) {
await mkdir(bdir, { recursive: true })
}