KnownPaths only works on Windows
rubensr opened this issue · 2 comments
rubensr commented
The method Convention.MustHaveFilesBeEmbeddedResources fails on non-Windows machines as the KnownPaths class seem to rely on backslashes (and maybe other Windows-isms).
Full stack trace:
Test method EntitlementsService.Tests.Conventions.DatabaseTests.MigrationScripts_MustBeEmbeddedResources threw exception:
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
Stack Trace:
at System.String.Substring(Int32 startIndex, Int32 length)
at Conventional.KnownPaths.<>c.<.cctor>b__15_1()
at Conventional.Extensions.AssemblyExtensions.ResolveProjectFilePath(Assembly assembly)
at Conventional.Conventions.Assemblies.AssemblyConventionSpecification.IsSatisfiedBy(Assembly assembly)
at Conventional.Conformist.MustConformTo(Assembly assembly, IAssemblyConventionSpecification assemblyConventionSpecification)
at EntitlementsService.Tests.Conventions.DatabaseTests.MigrationScripts_MustBeEmbeddedResources() in /Users/somepath/DatabaseTests.cs:line 13
andrewabest commented
@rubensr indeed it does, apologies for the extremely delayed response. My current use cases for conventional are windows-only, but given it runs on core now, it would be great to get it to work on unix-based OS's. I'd happily accept a PR to introduce this - either that or if and when I get around to needing it on linux, I'll introduce it then 👍
andrewabest commented
#68 addresses this issue, as of 7.x Conventional is now fully functional on Linux hosts 🎉