From 1d61e5fb19743ff266b1cdd3506a339f626e3286 Mon Sep 17 00:00:00 2001 From: Ferenc Hammerl Date: Wed, 14 Dec 2022 01:38:01 +0100 Subject: [PATCH] Fix linting --- packages/artifact/src/internal/utils.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/artifact/src/internal/utils.ts b/packages/artifact/src/internal/utils.ts index 2de06d62..e2a554fa 100644 --- a/packages/artifact/src/internal/utils.ts +++ b/packages/artifact/src/internal/utils.ts @@ -1,9 +1,9 @@ import crypto from 'crypto' -import { promises as fs } from 'fs' -import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http' -import { debug, info, warning } from '@actions/core' -import { HttpCodes, HttpClient, HttpClientResponse } from '@actions/http-client' -import { BearerCredentialHandler } from '@actions/http-client/lib/auth' +import {promises as fs} from 'fs' +import {IncomingHttpHeaders, OutgoingHttpHeaders} from 'http' +import {debug, info, warning} from '@actions/core' +import {HttpCodes, HttpClient, HttpClientResponse} from '@actions/http-client' +import {BearerCredentialHandler} from '@actions/http-client/lib/auth' import { getRuntimeToken, getRuntimeUrl, @@ -275,10 +275,9 @@ export async function rmFile(filePath: string): Promise { // download-http-client.ts#L151 no longer creates a file and we fail here try { await fs.stat(filePath) - } - catch (e) { - console.log("File does not exist."); - return; + } catch (e) { + // File does not exist + return } await fs.unlink(filePath) }