Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 197e4f2

Browse files
committed
The log on mac should be in ~/Library/Logs. Fixes #474
1 parent d74a8d6 commit 197e4f2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/GitHub.Api/Platform/DefaultEnvironment.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ public DefaultEnvironment()
4040

4141
UserCachePath = localAppData.Combine(ApplicationInfo.ApplicationName);
4242
SystemCachePath = commonAppData.Combine(ApplicationInfo.ApplicationName);
43-
LogPath = UserCachePath.Combine(logFile);
43+
if (IsMac)
44+
{
45+
LogPath = NPath.HomeDirectory.Combine("Library/Logs").Combine(ApplicationInfo.ApplicationName).Combine(logFile);
46+
}
47+
else
48+
{
49+
LogPath = UserCachePath.Combine(logFile);
50+
}
4451
}
4552

4653
public DefaultEnvironment(ICacheContainer cacheContainer) : this()

0 commit comments

Comments
 (0)