test the output and variables

This commit is contained in:
Artur
2023-03-11 17:21:01 +01:00
parent 1fe80c9136
commit c0466a77ff
8 changed files with 27 additions and 14 deletions

View File

@@ -28,8 +28,8 @@ export class DotnetTool implements IDotnetTool {
}
public disableTelemetry(): void {
this.buildAgent.exportVariable('DOTNET_CLI_TELEMETRY_OPTOUT', 'true')
this.buildAgent.exportVariable('DOTNET_NOLOGO', 'true')
this.buildAgent.setVariable('DOTNET_CLI_TELEMETRY_OPTOUT', 'true')
this.buildAgent.setVariable('DOTNET_NOLOGO', 'true')
}
public execute(cmd: string, args: string[]): Promise<IExecResult> {
@@ -102,7 +102,7 @@ export class DotnetTool implements IDotnetTool {
let dotnetPath = await this.buildAgent.which('dotnet')
dotnetPath = fs.readlinkSync(dotnetPath) || dotnetPath
const dotnetRoot = path.dirname(dotnetPath)
this.buildAgent.exportVariable('DOTNET_ROOT', dotnetRoot)
this.buildAgent.setVariable('DOTNET_ROOT', dotnetRoot)
}
this.buildAgent.addPath(toolPath)

View File

@@ -25,7 +25,7 @@ export interface IBuildAgent {
debug(message: string): void
setFailed(message: string, done?: boolean): void
setSucceeded(message: string, done?: boolean): void
exportVariable(name: string, val: string): void
setVariable(name: string, val: string): void
getVariable(name: string): string
addPath(inputPath: string): void
which(tool: string, check?: boolean): Promise<string>