mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-20 22:59:09 +08:00
fix results url construction
This commit is contained in:
parent
9e7201ff5b
commit
a920781ca9
@ -52,8 +52,8 @@ class ArtifactHttpClient implements Rpc {
|
||||
contentType: 'application/json' | 'application/protobuf',
|
||||
data: object | Uint8Array
|
||||
): Promise<object | Uint8Array> {
|
||||
const url = `${this.baseUrl}/twirp/${service}/${method}`
|
||||
debug(`Requesting ${url}`)
|
||||
const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href
|
||||
debug(`Requesting: ${url}`)
|
||||
const headers = {
|
||||
'Content-Type': contentType
|
||||
}
|
||||
|
@ -19,7 +19,8 @@ export function getResultsServiceUrl(): string {
|
||||
if (!resultsUrl) {
|
||||
throw new Error('Unable to get the ACTIONS_RESULTS_URL env variable')
|
||||
}
|
||||
return resultsUrl
|
||||
|
||||
return new URL(resultsUrl).origin
|
||||
}
|
||||
|
||||
export function isGhes(): boolean {
|
||||
|
Loading…
x
Reference in New Issue
Block a user