@@ -81,7 +81,7 @@ async function run(): Promise<void> {
8181 config . useCache
8282 ) {
8383 throw new Error (
84- "Caching of unstable releases is not supported on macOS runners"
84+ "Caching of unstable releases is not supported on macOS runners" ,
8585 ) ;
8686 }
8787
@@ -125,7 +125,7 @@ async function run(): Promise<void> {
125125 core . warning ( `Failed to get Tailscale status: ${ err } ` ) ;
126126 if ( runnerOS === runnerMacOS ) {
127127 core . setFailed (
128- `❌ Tailscale status is required in order to configure macOS`
128+ `❌ Tailscale status is required in order to configure macOS` ,
129129 ) ;
130130 process . exit ( 2 ) ;
131131 }
@@ -147,8 +147,8 @@ async function pingHostsIfNecessary(config: TailscaleConfig): Promise<void> {
147147
148148 core . info (
149149 `Will ping hosts ${ config . pingHosts . join (
150- ","
151- ) } up to 3 minutes each (in parallel) in order to check connectivity`
150+ "," ,
151+ ) } up to 3 minutes each (in parallel) in order to check connectivity`,
152152 ) ;
153153 let pings = config . pingHosts . map ( ( host ) => pingHost ( host ) ) ;
154154 for ( const ping of pings ) {
@@ -232,7 +232,7 @@ async function getInputs(): Promise<TailscaleConfig> {
232232
233233 if ( config . oauthSecret && ! config . tags ) {
234234 throw new Error (
235- "the tags parameter is required when using an OAuth client"
235+ "the tags parameter is required when using an OAuth client" ,
236236 ) ;
237237 }
238238
@@ -246,7 +246,7 @@ function validateAuth(config: TailscaleConfig): void {
246246 ( ! config . audience || ! config . oauthClientId || ! config . tags )
247247 ) {
248248 throw new Error (
249- "Please provide either an auth key, OAuth secret and tags, or federated identity client ID and audience with tags."
249+ "Please provide either an auth key, OAuth secret and tags, or federated identity client ID and audience with tags." ,
250250 ) ;
251251 }
252252
@@ -256,14 +256,14 @@ function validateAuth(config: TailscaleConfig): void {
256256 semver . gt ( "1.90.0" , config . version )
257257 ) {
258258 throw new Error (
259- "Workload identity federation requires using tailscale version 1.90.0 or later."
259+ "Workload identity federation requires using tailscale version 1.90.0 or later." ,
260260 ) ;
261261 }
262262}
263263
264264async function resolveVersion (
265265 version : string ,
266- runnerOS : string
266+ runnerOS : string ,
267267) : Promise < string > {
268268 if ( runnerOS === runnerMacOS && version === versionUnstable ) {
269269 return "main" ;
@@ -331,7 +331,7 @@ function getTailscaleArch(runnerOS: string): string {
331331
332332async function installTailscale (
333333 config : TailscaleConfig ,
334- runnerOS : string
334+ runnerOS : string ,
335335) : Promise < void > {
336336 const cacheKey = generateCacheKey ( config , runnerOS ) ;
337337 const toolPath = getToolPath ( config , runnerOS ) ;
@@ -341,7 +341,7 @@ async function installTailscale(
341341 const cacheHit = await cache . restoreCache ( [ toolPath ] , cacheKey ) ;
342342 if ( cacheHit ) {
343343 core . info (
344- `Found Tailscale ${ config . resolvedVersion } in cache: ${ toolPath } `
344+ `Found Tailscale ${ config . resolvedVersion } in cache: ${ toolPath } ` ,
345345 ) ;
346346
347347 // For Windows, install the cached MSI
@@ -394,7 +394,7 @@ async function calculateFileSha256(filePath: string): Promise<string> {
394394
395395async function installTailscaleLinux (
396396 config : TailscaleConfig ,
397- toolPath : string
397+ toolPath : string ,
398398) : Promise < void > {
399399 // Determine if stable or unstable
400400 const minor = parseInt ( config . resolvedVersion . split ( "." ) [ 1 ] ) ;
@@ -435,18 +435,18 @@ async function installTailscaleLinux(
435435 const extractedPath = await tc . extractTar ( tarPath , undefined , "xz" ) ;
436436 const extractedDir = path . join (
437437 extractedPath ,
438- `tailscale_${ config . resolvedVersion } _${ config . arch } `
438+ `tailscale_${ config . resolvedVersion } _${ config . arch } ` ,
439439 ) ;
440440
441441 // Create tool directory and copy binaries there for caching
442442 fs . mkdirSync ( toolPath , { recursive : true } ) ;
443443 fs . copyFileSync (
444444 path . join ( extractedDir , cmdTailscale ) ,
445- path . join ( toolPath , cmdTailscale )
445+ path . join ( toolPath , cmdTailscale ) ,
446446 ) ;
447447 fs . copyFileSync (
448448 path . join ( extractedDir , cmdTailscaled ) ,
449- path . join ( toolPath , cmdTailscaled )
449+ path . join ( toolPath , cmdTailscaled ) ,
450450 ) ;
451451
452452 // Install binaries to /usr/local/bin
@@ -473,7 +473,7 @@ async function installTailscaleLinux(
473473async function installTailscaleWindows (
474474 config : TailscaleConfig ,
475475 toolPath : string ,
476- fromCache : boolean = false
476+ fromCache : boolean = false ,
477477) : Promise < void > {
478478 // Create tool directory
479479 fs . mkdirSync ( toolPath , { recursive : true } ) ;
@@ -544,14 +544,14 @@ async function installTailscaleWindows(
544544
545545async function installTailscaleMacOS (
546546 config : TailscaleConfig ,
547- toolPath : string
547+ toolPath : string ,
548548) : Promise < void > {
549549 core . info ( "Building tailscale from src on macOS..." ) ;
550550
551551 // Clone the repo
552552 await execSilent (
553553 "glone tailscale repo" ,
554- "git clone https://github.com/tailscale/tailscale.git tailscale"
554+ "git clone https://github.com/tailscale/tailscale.git tailscale" ,
555555 ) ;
556556
557557 // Checkout the resolved version
@@ -561,7 +561,7 @@ async function installTailscaleMacOS(
561561 [ ] ,
562562 {
563563 cwd : cmdTailscale ,
564- }
564+ } ,
565565 ) ;
566566
567567 // Create tool directory and copy binaries there for caching
@@ -579,7 +579,7 @@ async function installTailscaleMacOS(
579579 ...process . env ,
580580 TS_USE_TOOLCHAIN : "1" ,
581581 } ,
582- }
582+ } ,
583583 ) ;
584584 }
585585
@@ -665,7 +665,7 @@ async function waitForDaemonReady(): Promise<void> {
665665 // If we get any valid response from the API, the daemon is ready
666666 if ( status ) {
667667 core . info (
668- `Daemon ready! Initial state: ${ status . BackendState || "Unknown" } `
668+ `Daemon ready! Initial state: ${ status . BackendState || "Unknown" } ` ,
669669 ) ;
670670 return ;
671671 }
@@ -679,13 +679,13 @@ async function waitForDaemonReady(): Promise<void> {
679679 }
680680
681681 throw new Error (
682- `tailscaled daemon did not become ready within timeout, last error: ${ lastErr } `
682+ `tailscaled daemon did not become ready within timeout, last error: ${ lastErr } ` ,
683683 ) ;
684684}
685685
686686async function connectToTailscale (
687687 config : TailscaleConfig ,
688- runnerOS : string
688+ runnerOS : string ,
689689) : Promise < void > {
690690 // Determine hostname
691691 let hostname = config . hostname ;
@@ -761,13 +761,13 @@ async function connectToTailscale(
761761 await Promise . race ( [
762762 execSilent ( "tailscale up" , execArgs [ 0 ] , execArgs . slice ( 1 ) ) ,
763763 new Promise < never > ( ( _ , reject ) =>
764- setTimeout ( ( ) => reject ( new Error ( "Timeout" ) ) , timeoutMs )
764+ setTimeout ( ( ) => reject ( new Error ( "Timeout" ) ) , timeoutMs ) ,
765765 ) ,
766766 ] ) ;
767767
768768 // Success
769769 core . info (
770- `✅ Tailscale up command completed successfully on attempt ${ attempt } `
770+ `✅ Tailscale up command completed successfully on attempt ${ attempt } ` ,
771771 ) ;
772772 return ;
773773 } catch ( error ) {
@@ -808,7 +808,7 @@ function sleep(ms: number): Promise<void> {
808808
809809function generateCacheKey (
810810 config : TailscaleConfig ,
811- runnerOS : string
811+ runnerOS : string ,
812812) : string | undefined {
813813 if ( ! config . useCache ) {
814814 return undefined ;
@@ -827,13 +827,13 @@ function getToolPath(config: TailscaleConfig, runnerOS: string): string {
827827 cacheDirectory ,
828828 cmdTailscale ,
829829 config . resolvedVersion ,
830- `${ runnerOS } -${ config . arch } `
830+ `${ runnerOS } -${ config . arch } ` ,
831831 ) ;
832832}
833833
834834async function installCachedBinaries (
835835 toolPath : string ,
836- runnerOS : string
836+ runnerOS : string ,
837837) : Promise < void > {
838838 if ( runnerOS === runnerLinux || runnerOS === runnerMacOS ) {
839839 // Copy cached binaries to /usr/local/bin
@@ -874,7 +874,7 @@ async function configureDNSOnMacOS(status: tailscaleStatus): Promise<void> {
874874 }
875875
876876 core . info (
877- `Setting system DNS server to 100.100.100.100 and searchdomains to ${ status . CurrentTailnet . MagicDNSSuffix } `
877+ `Setting system DNS server to 100.100.100.100 and searchdomains to ${ status . CurrentTailnet . MagicDNSSuffix } ` ,
878878 ) ;
879879 try {
880880 await execSilent ( "set dns servers" , "networksetup" , [
@@ -911,7 +911,7 @@ async function execSilent(
911911 label : string ,
912912 cmd : string ,
913913 args ?: string [ ] ,
914- opts ?: { }
914+ opts ?: { } ,
915915) : Promise < exec . ExecOutput > {
916916 core . info ( `▶️ ${ label } ` ) ;
917917 const out = await exec . getExecOutput ( cmd , args , {
@@ -927,7 +927,7 @@ async function execSilent(
927927 throw new execError (
928928 `${ cmd } failed with exit code ${ out . exitCode } ` ,
929929 out . exitCode ,
930- out . stderr
930+ out . stderr ,
931931 ) ;
932932 }
933933 return out ;
0 commit comments