From 88f749f68653a31ae33525e39fe25165b511d6ae Mon Sep 17 00:00:00 2001 From: Bethany Date: Wed, 23 Aug 2023 07:28:17 -0700 Subject: [PATCH] lint --- packages/artifact/src/internal/download/download-artifact.ts | 3 +-- packages/artifact/src/internal/upload/upload-artifact.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/artifact/src/internal/download/download-artifact.ts b/packages/artifact/src/internal/download/download-artifact.ts index 64abe289..32ac56ad 100644 --- a/packages/artifact/src/internal/download/download-artifact.ts +++ b/packages/artifact/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/packages/artifact/src/internal/upload/upload-artifact.ts b/packages/artifact/src/internal/upload/upload-artifact.ts index 01b37626..55911476 100644 --- a/packages/artifact/src/internal/upload/upload-artifact.ts +++ b/packages/artifact/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) {