Skip to content

Commit

Permalink
Use temporary directory for logs if not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleejordan committed Feb 28, 2024
1 parent 5301bed commit e5ca1d0
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,10 @@ private string GetLogDirPath()
string logDir = Path.GetDirectoryName(LogPath);
if (string.IsNullOrEmpty(logDir))
{
logDir = Directory.GetCurrentDirectory();
// Path.GetDirectoryName(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
logDir = Path.Combine(Path.GetTempPath(), "PowerShellEditorServices");
}

// Ensure logDir exists
Directory.CreateDirectory(logDir);

return logDir;
}

Expand Down

0 comments on commit e5ca1d0

Please sign in to comment.