Skip to content

Commit

Permalink
fix executing sign tool (#988)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 authored Jun 3, 2024
1 parent d6bcc3d commit cfc734c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,7 @@ export async function pack(options: IPackageOptions = {}): Promise<IPackageResul
return { manifest, packagePath, files };
}

export async function signPackage(packageFile: string, signScript: string): Promise<string> {
export async function signPackage(packageFile: string, signTool: string): Promise<string> {
const packageFolder = path.dirname(packageFile);
const packageName = path.basename(packageFile, '.vsix');
const manifestFile = path.join(packageFolder, `${packageName}.signature.manifest`);
Expand All @@ -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);
Expand Down

0 comments on commit cfc734c

Please sign in to comment.