Skip to content

Commit c80ab54

Browse files
committed
Add debugging to C# InstallLocations.cs to determine why the support path is wrong
1 parent aeef87b commit c80ab54

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

csharp/runner/SnippetRunner/InstallLocations.cs

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@ private static bool IsDirectory(string path)
220220
+ Environment.OSVersion.Platform);
221221
}
222222

223+
Console.Error.WriteLine();
224+
Console.Error.WriteLine("---------------------------------");
225+
Console.Error.WriteLine("PLATFORM ID: " + PlatformID.MacOSX);
226+
Console.Error.WriteLine("DEFAULT SUPPORT PATH: " + defaultSupportPath);
227+
Console.Error.WriteLine("---------------------------------");
228+
Console.Error.WriteLine();
229+
223230
// check for senzing system properties
224231
string? installPath = Environment.GetEnvironmentVariable(
225232
"SENZING_DIR");
@@ -311,22 +318,6 @@ private static bool IsDirectory(string path)
311318
}
312319
else
313320
{
314-
switch (Environment.OSVersion.Platform)
315-
{
316-
case PlatformID.Win32NT:
317-
defaultSupportPath = Path.Combine(installDir.FullName, "data");
318-
break;
319-
case PlatformID.MacOSX:
320-
defaultSupportPath = Path.Combine(installDir.FullName, "data");
321-
break;
322-
case PlatformID.Unix:
323-
break;
324-
default:
325-
throw new NotSupportedException(
326-
"Unsupported Operating System: "
327-
+ Environment.OSVersion.Platform);
328-
}
329-
330321
// no explicit path, try the default support path
331322
supportDir = new DirectoryInfo(defaultSupportPath);
332323
}

0 commit comments

Comments
 (0)