From 3024d0fb11dc62664fb90a95d414fe1de05fa7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Fri, 19 Aug 2022 13:44:28 +0200 Subject: [PATCH] fix: clarify simultaneous use of packagePath and target in `vsce publish` (#765) Fixes: #764 --- src/publish.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/publish.ts b/src/publish.ts index adb0f070..110b03f4 100644 --- a/src/publish.ts +++ b/src/publish.ts @@ -40,7 +40,9 @@ export async function publish(options: IPublishOptions = {}): Promise { 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 ' to first create a platform specific package, then use 'vsce publish --packagePath ' to publish it.` + ); } for (const packagePath of options.packagePath) {