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: clarify simultaneous use of packagePath and target in vsce publish #765

Merged
merged 3 commits into from Aug 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/publish.ts
Expand Up @@ -40,7 +40,9 @@ export async function publish(options: IPublishOptions = {}): Promise<any> {
if (options.version) {
throw new Error(`Both options not supported simultaneously: 'packagePath' and 'version'.`);
} else if (options.targets) {
throw new Error(`Both options not supported simultaneously: 'packagePath' and 'target'.`);
throw new Error(
`Both options not supported simultaneously: 'packagePath' and 'target'. Use 'vsce package --target <target>' to first create a platform specific package, then use 'vsce publish --packagePath <path>' to publish it.`
);
}

for (const packagePath of options.packagePath) {
Expand Down