File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import PackageJson from '@npmcli/package-json'
2
2
import assert from 'node:assert'
3
+ import * as path from 'node:path'
4
+ import { spawnSync } from 'node:child_process'
5
+ import { fileURLToPath } from 'node:url'
3
6
import semver from 'semver'
4
- import { spawnSync } from 'child_process'
7
+
8
+ const __dirname = fileURLToPath ( new URL ( '.' , import . meta. url ) )
5
9
6
10
// Let `vsce` get the metadata for the extension
7
11
// Querying the marketplace API directly is not supported or recommended
8
12
let result = spawnSync (
9
- './ node_modules/.bin/vsce',
13
+ path . resolve ( __dirname , '../../ node_modules/.bin/vsce') ,
10
14
[ 'show' , 'bradlc.vscode-tailwindcss' , '--json' ] ,
11
15
{ encoding : 'utf8' } ,
12
16
)
@@ -16,6 +20,7 @@ let metadata = JSON.parse(result.stdout)
16
20
if ( ! metadata ) {
17
21
console . error ( result . stdout )
18
22
console . error ( result . stderr )
23
+ console . error ( result . error )
19
24
throw new Error ( 'Failed to get extension metadata' )
20
25
}
21
26
You can’t perform that action at this time.
0 commit comments