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 13, 2024
1 parent 1b824f1 commit 83192b5
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.Join(Path.GetTempPath(), "PowerShellEditorServices");

Check failure on line 304 in src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs

View workflow job for this annotation

GitHub Actions / dotnet (windows-latest)

'Path' does not contain a definition for 'Join'
}

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

return logDir;
}

Expand Down

0 comments on commit 83192b5

Please sign in to comment.