Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for OSX #18

Merged
merged 2 commits into from
Sep 14, 2023
Merged

Add Support for OSX #18

merged 2 commits into from
Sep 14, 2023

Conversation

halgari
Copy link
Contributor

@halgari halgari commented Sep 14, 2023

Fixes the tests for OSX. It's strange, on OSX, .HasKnownFolder(ProgramFiles) returns false, but .GetKnownFolder(ProgramFiles) doesn't throw like it should. So we just disable the test for this platform

@codecov-commenter
Copy link

codecov-commenter commented Sep 14, 2023

Codecov Report

Patch has no changes to coverable lines.

Files Changed Coverage
src/NexusMods.Paths/IOSInformation.cs 0.00%

📢 Thoughts on this report? Let us know!.

@halgari halgari changed the title Fix known paths tests for OSX Add Support for OSX Sep 14, 2023
@halgari halgari merged commit 7b24244 into main Sep 14, 2023
5 checks passed
@halgari halgari deleted the osx-support branch September 14, 2023 04:59
Comment on lines +36 to +40
/// <summary>
/// Whether the current <see cref="Platform"/> is Osx or Linux
/// </summary>
bool IsUnixLike => Platform == OSPlatform.OSX || Platform == OSPlatform.Linux;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as

/// <summary>
/// Returns <c>true</c> if the current platform is Unix-based.
/// </summary>
/// <returns></returns>
bool IsUnix() => IsLinux || IsOSX;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks I'll fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants