Skip to content

Azure Pipleines Environement Agent Info uses FilePath instead of DirectoryPath #4534

@Cheesebaron

Description

@Cheesebaron

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

Cake runner

Cake .NET Tool

Cake version

5.0.0

Operating system

macOS

Operating system architecture

Arm64

CI Server

Azure DevOps

What are you seeing?

When referring to the properties AzurePipelinesAgentInfo they are returning FilePath instead of DirectoryPath for the properties:

  • BuildDirectory
  • HomeDirectory
  • ToolsDirectory
  • WorkingDirectory

What is expected?

I would expect the properties to be DirectoryPath so you can easily use Combine and other methods to create a path. You have to convert the FilePath to DirectoryPath manually first.

This was fixed on Build info previously. See: #3590

Steps to Reproduce

Calling something like: AzurePipelines.Environment.Agent.HomeDirectory.Combine(".sonarqube/out/"); will give you:

error CS1061: 'FilePath' does not contain a definition for 'Combine' and no accessible extension method 'Combine' accepting a first argument of type 'FilePath' could be found (are you missing a using directive or an assembly reference?)

Output log

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions