mirror of https://github.com/actions/toolkit
fix results url construction
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…
Reference in New Issue