Skip to content

FAKE.DotNet.Cli / Mono.Posix / Symlinks #2790

Description

@Numpsy

A thought (as yet not investigated in any more detail than this)

Fake currently has a dependency on Mono.Posix.NetStandard to get the 'GetRealPath' function to resolve symlinks:

Mono.Unix.UnixPath.GetRealPath(dotnetTool) |> Path.GetDirectoryName

That caused a problem on ARM CPU macs due to the lack of an ARM build of the native code part of that package.

I tried updating it to the newer Mono.Unix package in #2781 back that failed with other issues.

So, I was reading about a little for ideas and noticed that .NET 6.0 now has a built in 'ResolveLinkTarget' function that does this sort of thing with no external dependencies:
https://learn.microsoft.com/en-us/dotnet/api/system.io.file.resolvelinktarget?view=net-6.0

So - I wonder if it be possible to use that for .NET 6.0 builds and avoid the Mono.Unix dependency?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions