From 7188d5f703d99ca4b28e964bba4be64623be9ec6 Mon Sep 17 00:00:00 2001 From: Bethany Date: Wed, 23 Aug 2023 07:28:17 -0700 Subject: [PATCH] lint --- src/internal/download/download-artifact.ts | 3 +-- src/internal/upload/upload-artifact.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/internal/download/download-artifact.ts b/src/internal/download/download-artifact.ts index 64abe28..32ac56a 100644 --- a/src/internal/download/download-artifact.ts +++ b/src/internal/download/download-artifact.ts @@ -1,4 +1,3 @@ -import path from 'path' import fs from 'fs/promises' import * as github from '@actions/github' import * as core from '@actions/core' @@ -55,7 +54,7 @@ export async function downloadArtifact( token: string, options?: DownloadArtifactOptions ): Promise { - let downloadPath = options?.path || getGitHubWorkspaceDir() + const downloadPath = options?.path || getGitHubWorkspaceDir() if (!(await exists(downloadPath))) { core.debug( diff --git a/src/internal/upload/upload-artifact.ts b/src/internal/upload/upload-artifact.ts index 01b3762..5591147 100644 --- a/src/internal/upload/upload-artifact.ts +++ b/src/internal/upload/upload-artifact.ts @@ -97,7 +97,7 @@ export async function uploadArtifact( workflowRunBackendId: backendIds.workflowRunBackendId, workflowJobRunBackendId: backendIds.workflowJobRunBackendId, name, - size: uploadResult.uploadSize!.toString() + size: uploadResult.uploadSize ? uploadResult.uploadSize.toString() : '0' } if (uploadResult.md5Hash) {