Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions extensions/ql-vscode/scripts/source-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ async function extractSourceMap() {
const releaseAssetsDirectory = resolve(
__dirname,
"..",
"artifacts",
"release-assets",
versionNumber,
);
Expand All @@ -64,7 +65,9 @@ async function extractSourceMap() {
]);

const sourcemapAsset = release.assets.find(
(asset) => asset.name === `vscode-codeql-sourcemaps-${versionNumber}.zip`,
(asset) =>
asset.label === `vscode-codeql-sourcemaps-${versionNumber}.zip` ||
asset.name === "vscode-codeql-sourcemaps.zip",
);

if (sourcemapAsset) {
Expand Down Expand Up @@ -213,9 +216,7 @@ extractSourceMap().catch((e: unknown) => {
function runGh(args: readonly string[]): string {
const gh = spawnSync("gh", args);
if (gh.status !== 0) {
throw new Error(
`Failed to get the source map for ${versionNumber}: ${gh.stderr}`,
);
throw new Error(`Failed to run gh ${args.join(" ")}: ${gh.stderr}`);
}
return gh.stdout.toString("utf-8");
}
Expand All @@ -227,6 +228,7 @@ function runGhJSON<T>(args: readonly string[]): T {
type ReleaseAsset = {
id: string;
name: string;
label: string;
};

type Release = {
Expand Down
Loading