mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-06 17:43:14 +08:00
Minor refactoring
This commit is contained in:
12
packages/cache/src/internal/uploadUtils.ts
vendored
12
packages/cache/src/internal/uploadUtils.ts
vendored
@@ -119,6 +119,16 @@ export class UploadProgress {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Uploads a cache archive directly to Azure Blob Storage using the Azure SDK.
|
||||
* This function will display progress information to the console. Concurrency of the
|
||||
* upload is determined by the calling functions.
|
||||
*
|
||||
* @param signedUploadURL
|
||||
* @param archivePath
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export async function uploadCacheArchiveSDK(
|
||||
signedUploadURL: string,
|
||||
archivePath: string,
|
||||
@@ -151,7 +161,7 @@ export async function uploadCacheArchiveSDK(
|
||||
// TODO: better management of non-retryable errors
|
||||
if (response._response.status >= 400) {
|
||||
throw new InvalidResponseError(
|
||||
`Upload failed with status code ${response._response.status}`
|
||||
`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user