Skip to content

Commit

Permalink
handle the case of no executable
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Feb 19, 2024
1 parent 5b04066 commit 10083e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Snowflake.Data/Core/Tools/EnvironmentOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 10083e6

Please sign in to comment.