fix(airi-plugin-vscode): should not hard encode the path as it fails on Windows

This commit is contained in:
Neko Ayaka
2025-12-10 21:06:41 +08:00
parent d9bc556a87
commit 327cbe766e
@@ -1,4 +1,4 @@
import { dirname } from 'node:path'
import { dirname, join } from 'node:path'
import { exec } from 'tinyexec'
@@ -7,7 +7,7 @@ import { packageJSONForVSCode } from './shared'
async function run() {
const { restore, name } = await packageJSONForVSCode('airi-vscode')
const execGen = exec('pnpm', ['-F', name, 'exec', 'vscode-ext-gen', '--scope=unocss', '--output', 'src/generated/meta.ts'], { nodeOptions: { cwd: dirname(new URL('../', import.meta.url).pathname) } })
const execGen = exec('pnpm', ['-F', name, 'exec', 'vscode-ext-gen', '--scope=unocss', '--output', join('src', 'generated', 'meta.ts')], { nodeOptions: { cwd: dirname(new URL('../', import.meta.url).pathname) } })
for await (const line of execGen) {
// eslint-disable-next-line no-console
console.log(line)