mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-17 09:48:04 +08:00
catch errors at the root, remove unneccessary disabled rule
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {UploadOptions} from './upload/upload-options'
|
||||
import {UploadResponse} from './upload/upload-response'
|
||||
import {uploadArtifact} from './upload/upload-artifact'
|
||||
import {warning} from '@actions/core'
|
||||
|
||||
export interface ArtifactClient {
|
||||
/**
|
||||
@@ -39,6 +40,13 @@ export class Client implements ArtifactClient {
|
||||
rootDirectory: string,
|
||||
options?: UploadOptions | undefined
|
||||
): Promise<UploadResponse> {
|
||||
return uploadArtifact(name, files, rootDirectory, options)
|
||||
try {
|
||||
return uploadArtifact(name, files, rootDirectory, options)
|
||||
} catch (error) {
|
||||
warning(`Failed to upload artifact: ${error}`)
|
||||
return {
|
||||
success: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user