catch errors at the root, remove unneccessary disabled rule

This commit is contained in:
Bethany committed 2023-08-09 12:08:43 -07:00
1 parent 5a7b20df59
commit 31046e8606
4 files changed
+29 -68

No files matched your search

+9 -1
View File
@@ -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
}
}
}
}