Permalink
Browse files

Mac compatibility

A simple "/" vs "\" error shows up when using NSwag in a mac Terminal, here's the fix I found.
  • Loading branch information...
framinosona committed Feb 8, 2019
1 parent b83fb18 commit 1ca1ff9d9fc57be6e6f7c5829adf006bea193321
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/NSwag.Commands/Commands/IsolatedCommandBase.cs
@@ -98,13 +98,13 @@ public IEnumerable<string> GetAssemblies(string assemblyDirectory)
{
var codeBaseDirectory = Path.GetDirectoryName(new Uri(typeof(IsolatedCommandBase<>).GetTypeInfo().Assembly.CodeBase).LocalPath);

yield return codeBaseDirectory + "/Newtonsoft.Json.dll";
yield return codeBaseDirectory + "/NJsonSchema.dll";
yield return codeBaseDirectory + "/NSwag.Core.dll";
yield return codeBaseDirectory + "/NSwag.Commands.dll";
yield return codeBaseDirectory + "/NSwag.SwaggerGeneration.dll";
yield return codeBaseDirectory + "/NSwag.SwaggerGeneration.WebApi.dll";
yield return codeBaseDirectory + "/NSwag.SwaggerGeneration.AspNetCore.dll";
yield return codeBaseDirectory + Path.DirectorySeparatorChar + "Newtonsoft.Json.dll";
yield return codeBaseDirectory + Path.DirectorySeparatorChar + "NJsonSchema.dll";
yield return codeBaseDirectory + Path.DirectorySeparatorChar + "NSwag.Core.dll";
yield return codeBaseDirectory + Path.DirectorySeparatorChar + "NSwag.Commands.dll";
yield return codeBaseDirectory + Path.DirectorySeparatorChar + "NSwag.SwaggerGeneration.dll";
yield return codeBaseDirectory + Path.DirectorySeparatorChar + "NSwag.SwaggerGeneration.WebApi.dll";
yield return codeBaseDirectory + Path.DirectorySeparatorChar + "NSwag.SwaggerGeneration.AspNetCore.dll";
}
#else
public IEnumerable<Assembly> GetAssemblies(string assemblyDirectory)
@@ -137,4 +137,4 @@ public IEnumerable<BindingRedirect> GetBindingRedirects()
#endif
}
}
}
}

0 comments on commit 1ca1ff9

Please sign in to comment.