Skip to content

Commit

Permalink
Signature file seems to not be used for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fwal committed Jul 3, 2024
1 parent dc3d8ce commit 7a4bf15
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/gpg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export async function setupKeys() {
await refreshKeys();
}

export async function verify(signaturePath: string, packagePath: string) {
export async function verify(...paths: string[]) {
core.debug("Verifying signature");
await exec("gpg", ["--verify", signaturePath, packagePath]);
await exec("gpg", ["--verify", ...paths]);
}

export async function refreshKeys() {
Expand Down
2 changes: 1 addition & 1 deletion src/linux-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function install(version: string, system: System) {
const swiftPkg = swiftPackage(version, system);
let { pkg, signature } = await download(swiftPkg);

await verify(signature, pkg);
await verify(pkg, signature);

swiftPath = await unpack(pkg, swiftPkg.name, version, system);
} else {
Expand Down
8 changes: 4 additions & 4 deletions src/windows-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export async function install(version: string, system: System) {

await setupKeys();

let { exe, signature } = await download(swiftPkg);
await verify(signature, exe);
let { exe } = await download(swiftPkg);
await verify(exe);

const exePath = await toolCache.cacheFile(
exe,
Expand Down Expand Up @@ -80,11 +80,11 @@ export async function install(version: string, system: System) {
async function download({ url, name }: Package) {
core.debug("Downloading Swift for windows");

let [exe, signature] = await Promise.all([
let [exe] = await Promise.all([
toolCache.downloadTool(url),
toolCache.downloadTool(`${url}.sig`),
]);

core.debug("Swift download complete");
return { exe, signature, name };
return { exe, name };
}

0 comments on commit 7a4bf15

Please sign in to comment.