File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11import { exec } from "@actions/exec" ;
22import * as core from "@actions/core" ;
33import * as toolCache from "@actions/tool-cache" ;
4- import { OS , System } from "./os" ;
4+ import { OS } from "./os" ;
55
6- export async function setupKeys ( system : System ) {
6+ export async function setupKeys ( os : OS ) {
77 core . debug ( "Fetching verification keys" ) ;
88 let path = await toolCache . downloadTool (
99 "https://swift.org/keys/all-keys.asc" ,
1010 ) ;
1111
12- if ( system . os === OS . Ubuntu || system . os === OS . MacOS ) {
12+ if ( os === 'linux' || os === 'darwin' ) {
1313 core . debug ( "Examining verification keys" ) ;
1414 await exec ( `file "${ path } "` ) ;
1515 const isPlaintext = await exec ( `gunzip --test "${ path } "` , undefined , {
@@ -24,7 +24,7 @@ export async function setupKeys(system: System) {
2424 ] ) ;
2525 }
2626
27- if ( system . os === OS . Windows ) {
27+ if ( os === 'win32' ) {
2828 core . debug ( "Importing verification keys" ) ;
2929 await exec ( `gpg --import "${ path } "` ) ;
3030 }
Original file line number Diff line number Diff line change @@ -9,3 +9,5 @@ export async function getOS() {
99
1010 return detectedSystem . os ;
1111}
12+
13+ export type OS = getos . Os [ "os" ] ;
You can’t perform that action at this time.
0 commit comments