Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Could not find extension target platform #86

Merged

Conversation

steel97
Copy link

@steel97 steel97 commented Jan 21, 2025

Latest version of extension will throw error shown below, if package published with:

npx gulp 'vsix:release:neutral'

screenshot

Reason is that neutral build doesn't contains TargetPlatform in vsixmanifest, which is required here:

const contents = await readFile(vsixManifestFile, 'utf-8');
const targetPlatformMatch = /TargetPlatform="(.*)"/.exec(contents);
if (!targetPlatformMatch) {
throw new Error(`Could not find extension target platform in ${vsixManifestFile}`);
}

Suggested solution is to return undefined instead of throwing error, in that case proccess.arch will be used:

const extensionArchitecture = (await this.getArchitectureFromTargetPlatform()) ?? process.arch;

Tested on: VSCodium 1.96.4, windows 11

Upd: also tested on macos (arm), same VSCodium version

@muhammadsammy muhammadsammy merged commit 0782dd6 into muhammadsammy:master Jan 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants