mirror of https://github.com/actions/toolkit
fix typo
parent
b9872153b8
commit
a3053b5cc2
|
@ -17,7 +17,7 @@ import {
|
||||||
} from './download/download-artifact'
|
} from './download/download-artifact'
|
||||||
import {getArtifactPublic, getArtifactInternal} from './find/get-artifact'
|
import {getArtifactPublic, getArtifactInternal} from './find/get-artifact'
|
||||||
import {listArtifactsPublic, listArtifactsInternal} from './find/list-artifacts'
|
import {listArtifactsPublic, listArtifactsInternal} from './find/list-artifacts'
|
||||||
import {GHESNotSupportError} from './shared/errors'
|
import {GHESNotSupportedError} from './shared/errors'
|
||||||
|
|
||||||
export interface ArtifactClient {
|
export interface ArtifactClient {
|
||||||
/**
|
/**
|
||||||
|
@ -103,7 +103,7 @@ export class Client implements ArtifactClient {
|
||||||
): Promise<UploadArtifactResponse> {
|
): Promise<UploadArtifactResponse> {
|
||||||
try {
|
try {
|
||||||
if (isGhes()) {
|
if (isGhes()) {
|
||||||
throw new GHESNotSupportError()
|
throw new GHESNotSupportedError()
|
||||||
}
|
}
|
||||||
|
|
||||||
return uploadArtifact(name, files, rootDirectory, options)
|
return uploadArtifact(name, files, rootDirectory, options)
|
||||||
|
@ -129,7 +129,7 @@ If the error persists, please check whether Actions is operating normally at [ht
|
||||||
): Promise<DownloadArtifactResponse> {
|
): Promise<DownloadArtifactResponse> {
|
||||||
try {
|
try {
|
||||||
if (isGhes()) {
|
if (isGhes()) {
|
||||||
throw new GHESNotSupportError()
|
throw new GHESNotSupportedError()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options?.findBy) {
|
if (options?.findBy) {
|
||||||
|
@ -169,7 +169,7 @@ If the error persists, please check whether Actions and API requests are operati
|
||||||
): Promise<ListArtifactsResponse> {
|
): Promise<ListArtifactsResponse> {
|
||||||
try {
|
try {
|
||||||
if (isGhes()) {
|
if (isGhes()) {
|
||||||
throw new GHESNotSupportError()
|
throw new GHESNotSupportedError()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options?.findBy) {
|
if (options?.findBy) {
|
||||||
|
@ -209,7 +209,7 @@ If the error persists, please check whether Actions and API requests are operati
|
||||||
): Promise<GetArtifactResponse> {
|
): Promise<GetArtifactResponse> {
|
||||||
try {
|
try {
|
||||||
if (isGhes()) {
|
if (isGhes()) {
|
||||||
throw new GHESNotSupportError()
|
throw new GHESNotSupportedError()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options?.findBy) {
|
if (options?.findBy) {
|
||||||
|
|
|
@ -27,11 +27,11 @@ export class ArtifactNotFoundError extends Error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GHESNotSupportError extends Error {
|
export class GHESNotSupportedError extends Error {
|
||||||
constructor(
|
constructor(
|
||||||
message = '@actions/artifact v2.0.0+ and download-artifact@v4+ are not currently supported on GHES.'
|
message = '@actions/artifact v2.0.0+ and download-artifact@v4+ are not currently supported on GHES.'
|
||||||
) {
|
) {
|
||||||
super(message)
|
super(message)
|
||||||
this.name = 'NotSupportedGHESError'
|
this.name = 'GHESNotSupportedError'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue