diff --git a/src/package.ts b/src/package.ts index e09866bc..0532ba87 100644 --- a/src/package.ts +++ b/src/package.ts @@ -1843,7 +1843,7 @@ export async function pack(options: IPackageOptions = {}): Promise { +export async function signPackage(packageFile: string, signTool: string): Promise { const packageFolder = path.dirname(packageFile); const packageName = path.basename(packageFile, '.vsix'); const manifestFile = path.join(packageFolder, `${packageName}.signature.manifest`); @@ -1854,7 +1854,7 @@ export async function signPackage(packageFile: string, signScript: string): Prom await generateManifest(packageFile, manifestFile); // Sign the manifest file to generate the signature file - cp.spawnSync(signScript, [manifestFile, signatureFile], { stdio: 'inherit' }); + cp.execSync(`${signTool} ${manifestFile} ${signatureFile}`, { stdio: 'inherit' }); // Create a signature zip file containing the manifest and signature file return zip(manifestFile, signatureFile, signatureZip);