fix(airi-plugin-vscode): should not hard encode the path as it fails on Windows
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user