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) {