mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 06:47:09 +01:00
Fix problematic retransmission of authentication token
The retransmission of the authentication token to the server providing the artifact caused the following errors when using Artifacts v4: HTTPError: Response code 400 (Authentication information is not given in the correct format. Check the value of Authorization header.) It looks like the service serving the artifacts does not expect the authentication header, and therefore complaines about inproper use of the authentication header.
This commit is contained in:
parent
c40d89d5e9
commit
ea07b9e68a
2 changed files with 2 additions and 2 deletions
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
|
|
@ -2168,7 +2168,7 @@ function downloadArtifact(octokit, artifactId, fileName, token) {
|
||||||
if (typeof url !== 'string') {
|
if (typeof url !== 'string') {
|
||||||
throw new Error(`Location header has unexpected value: ${url}`);
|
throw new Error(`Location header has unexpected value: ${url}`);
|
||||||
}
|
}
|
||||||
const downloadStream = got_1.default.stream(url, { headers });
|
const downloadStream = got_1.default.stream(url);
|
||||||
const fileWriterStream = (0, fs_1.createWriteStream)(fileName);
|
const fileWriterStream = (0, fs_1.createWriteStream)(fileName);
|
||||||
core.info(`Downloading ${url}`);
|
core.info(`Downloading ${url}`);
|
||||||
downloadStream.on('downloadProgress', ({ transferred }) => {
|
downloadStream.on('downloadProgress', ({ transferred }) => {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ export async function downloadArtifact(
|
||||||
throw new Error(`Location header has unexpected value: ${url}`)
|
throw new Error(`Location header has unexpected value: ${url}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadStream = got.stream(url, {headers})
|
const downloadStream = got.stream(url)
|
||||||
const fileWriterStream = createWriteStream(fileName)
|
const fileWriterStream = createWriteStream(fileName)
|
||||||
|
|
||||||
core.info(`Downloading ${url}`)
|
core.info(`Downloading ${url}`)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue