mirror of
https://github.com/actions/deploy-pages.git
synced 2026-04-04 08:42:11 +00:00
Display artifact name in some post-filter error messages
This commit is contained in:
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@@ -146608,7 +146608,7 @@ async function getArtifactMetadata({ artifactName }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
core.info(`Fetching artifact metadata for ${artifactName} in this workflow run`)
|
core.info(`Fetching artifact metadata for "${artifactName}" in this workflow run`)
|
||||||
|
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
@@ -146627,11 +146627,11 @@ async function getArtifactMetadata({ artifactName }) {
|
|||||||
|
|
||||||
if (artifactCount === 0) {
|
if (artifactCount === 0) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
'No artifacts found for this workflow run. Ensure artifacts are uploaded with actions/artifact@v4 or later.'
|
`No artifacts named "${artifactName}" were found for this workflow run. Ensure artifacts are uploaded with actions/artifact@v4 or later.`
|
||||||
)
|
)
|
||||||
} else if (artifactCount > 1) {
|
} else if (artifactCount > 1) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Multiple artifacts unexpectedly found for this workflow run. Artifact count is ${artifactCount}.`
|
`Multiple artifacts named "${artifactName}" were unexpectedly found for this workflow run. Artifact count is ${artifactCount}.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -383,7 +383,7 @@ describe('Deployment', () => {
|
|||||||
|
|
||||||
const deployment = new Deployment()
|
const deployment = new Deployment()
|
||||||
await expect(deployment.create(fakeJwt)).rejects.toThrow(
|
await expect(deployment.create(fakeJwt)).rejects.toThrow(
|
||||||
`Multiple artifacts unexpectedly found for this workflow run. Artifact count is 2.`
|
`Multiple artifacts named "github-pages" were unexpectedly found for this workflow run. Artifact count is 2.`
|
||||||
)
|
)
|
||||||
twirpScope.done()
|
twirpScope.done()
|
||||||
})
|
})
|
||||||
@@ -403,7 +403,7 @@ describe('Deployment', () => {
|
|||||||
|
|
||||||
const deployment = new Deployment()
|
const deployment = new Deployment()
|
||||||
await expect(deployment.create(fakeJwt)).rejects.toThrow(
|
await expect(deployment.create(fakeJwt)).rejects.toThrow(
|
||||||
`No artifacts found for this workflow run. Ensure artifacts are uploaded with actions/artifact@v4 or later.`
|
`No artifacts named "github-pages" were found for this workflow run. Ensure artifacts are uploaded with actions/artifact@v4 or later.`
|
||||||
)
|
)
|
||||||
twirpScope.done()
|
twirpScope.done()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ async function getArtifactMetadata({ artifactName }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
core.info(`Fetching artifact metadata for ${artifactName} in this workflow run`)
|
core.info(`Fetching artifact metadata for "${artifactName}" in this workflow run`)
|
||||||
|
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
@@ -82,11 +82,11 @@ async function getArtifactMetadata({ artifactName }) {
|
|||||||
|
|
||||||
if (artifactCount === 0) {
|
if (artifactCount === 0) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
'No artifacts found for this workflow run. Ensure artifacts are uploaded with actions/artifact@v4 or later.'
|
`No artifacts named "${artifactName}" were found for this workflow run. Ensure artifacts are uploaded with actions/artifact@v4 or later.`
|
||||||
)
|
)
|
||||||
} else if (artifactCount > 1) {
|
} else if (artifactCount > 1) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Multiple artifacts unexpectedly found for this workflow run. Artifact count is ${artifactCount}.`
|
`Multiple artifacts named "${artifactName}" were unexpectedly found for this workflow run. Artifact count is ${artifactCount}.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user