1
0
Fork 0

Fix linting

pull/1266/head
Ferenc Hammerl 2022-12-14 01:38:01 +01:00
parent 4abb5a2ae0
commit 1d61e5fb19
1 changed files with 8 additions and 9 deletions

View File

@ -1,9 +1,9 @@
import crypto from 'crypto' import crypto from 'crypto'
import { promises as fs } from 'fs' import {promises as fs} from 'fs'
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http' import {IncomingHttpHeaders, OutgoingHttpHeaders} from 'http'
import { debug, info, warning } from '@actions/core' import {debug, info, warning} from '@actions/core'
import { HttpCodes, HttpClient, HttpClientResponse } from '@actions/http-client' import {HttpCodes, HttpClient, HttpClientResponse} from '@actions/http-client'
import { BearerCredentialHandler } from '@actions/http-client/lib/auth' import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
import { import {
getRuntimeToken, getRuntimeToken,
getRuntimeUrl, getRuntimeUrl,
@ -275,10 +275,9 @@ export async function rmFile(filePath: string): Promise<void> {
// download-http-client.ts#L151 no longer creates a file and we fail here // download-http-client.ts#L151 no longer creates a file and we fail here
try { try {
await fs.stat(filePath) await fs.stat(filePath)
} } catch (e) {
catch (e) { // File does not exist
console.log("File does not exist."); return
return;
} }
await fs.unlink(filePath) await fs.unlink(filePath)
} }