From 562847fbc95595f96b624e55a8748814e760a262 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Wed, 7 Aug 2024 09:59:28 -0400 Subject: [PATCH] wip --- .github/workflows/bump-version.mjs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump-version.mjs b/.github/workflows/bump-version.mjs index 13d380b1..aecebdfb 100644 --- a/.github/workflows/bump-version.mjs +++ b/.github/workflows/bump-version.mjs @@ -1,12 +1,16 @@ import PackageJson from '@npmcli/package-json' import assert from 'node:assert' +import * as path from 'node:path' +import { spawnSync } from 'node:child_process' +import { fileURLToPath } from 'node:url' import semver from 'semver' -import { spawnSync } from 'child_process' + +const __dirname = fileURLToPath(new URL('.', import.meta.url)) // Let `vsce` get the metadata for the extension // Querying the marketplace API directly is not supported or recommended let result = spawnSync( - './node_modules/.bin/vsce', + path.resolve(__dirname, '../../node_modules/.bin/vsce'), ['show', 'bradlc.vscode-tailwindcss', '--json'], { encoding: 'utf8' }, ) @@ -16,6 +20,7 @@ let metadata = JSON.parse(result.stdout) if (!metadata) { console.error(result.stdout) console.error(result.stderr) + console.error(result.error) throw new Error('Failed to get extension metadata') }