diff --git a/Snowflake.Data/Core/Tools/EnvironmentOperations.cs b/Snowflake.Data/Core/Tools/EnvironmentOperations.cs index eb77eb56f..fd5676183 100644 --- a/Snowflake.Data/Core/Tools/EnvironmentOperations.cs +++ b/Snowflake.Data/Core/Tools/EnvironmentOperations.cs @@ -24,7 +24,7 @@ public virtual string GetFolderPath(Environment.SpecialFolder folder) public virtual string GetExecutionDirectory() { var executablePath = Environment.GetCommandLineArgs()[0]; - return Path.GetDirectoryName(executablePath); + return string.IsNullOrEmpty(executablePath) ? null : Path.GetDirectoryName(executablePath); } } }