use exe.getExecOutput instead of exe.exec in the GitHub implementation

This commit is contained in:
Artur Stolear
2023-10-14 19:33:32 +02:00
parent fa6f81a896
commit 9bda1cf33b
2 changed files with 6 additions and 18 deletions

View File

@@ -19,7 +19,7 @@ export class DotnetTool implements IDotnetTool {
protected versionManager: IVersionManager
private httpClient: http.HttpClient
private static readonly nugetRoot: string = 'https://azuresearch-usnc.nuget.org/'
private static readonly nugetRoot: string = 'https://azuresearch-usnc.nuget.org/query'
constructor(@inject(TYPES.IBuildAgent) buildAgent: IBuildAgent, @inject(TYPES.IVersionManager) versionManager: IVersionManager) {
this.buildAgent = buildAgent
@@ -116,7 +116,7 @@ export class DotnetTool implements IDotnetTool {
const toolNameParam = encodeURIComponent(toolName.toLowerCase())
const prereleaseParam = includePrerelease ? 'true' : 'false'
const downloadPath = `${DotnetTool.nugetRoot}query?q=${toolNameParam}&prerelease=${prereleaseParam}&semVerLevel=2.0.0&take=1`
const downloadPath = `${DotnetTool.nugetRoot}?q=${toolNameParam}&prerelease=${prereleaseParam}&semVerLevel=2.0.0&take=1`
const res = await this.httpClient.get(downloadPath)