Skip to content

Commit 36d14a4

Browse files
committed
Resolve absolute path from global.json relative sdk path
1 parent 3d755ab commit 36d14a4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Installer/dnup/IDotnetInstallManager.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ public class GlobalJsonInfo
4343
public string? SdkVersion => GlobalJsonContents?.Sdk?.Version;
4444
public bool? AllowPrerelease => GlobalJsonContents?.Sdk?.AllowPrerelease;
4545
public string? RollForward => GlobalJsonContents?.Sdk?.RollForward;
46-
public string? SdkPath => (GlobalJsonContents?.Sdk?.Paths is not null && GlobalJsonContents.Sdk.Paths.Length > 0) ? GlobalJsonContents.Sdk.Paths[0] : null;
46+
public string? SdkPath
47+
{
48+
get
49+
{
50+
return (GlobalJsonContents?.Sdk?.Paths is not null && GlobalJsonContents.Sdk.Paths.Length > 0) ?
51+
Path.GetFullPath(GlobalJsonContents.Sdk.Paths[0], GlobalJsonPath!) : null;
52+
}
53+
}
4754
}
4855

4956
public record DotnetInstallRootConfiguration(

0 commit comments

Comments
 (0)