Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Dec 2, 2024
1 parent e3b87e1 commit c5e386c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 5 additions & 6 deletions CliWrap/Utils/EnvironmentEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ namespace CliWrap.Utils;

internal static class EnvironmentEx
{
private static readonly Lazy<string?> ProcessPathLazy =
new(() =>
{
using var process = Process.GetCurrentProcess();
return process.MainModule?.FileName;
});
private static readonly Lazy<string?> ProcessPathLazy = new(() =>
{
using var process = Process.GetCurrentProcess();
return process.MainModule?.FileName;
});

public static string? ProcessPath => ProcessPathLazy.Value;
}
6 changes: 4 additions & 2 deletions CliWrap/Utils/ProcessEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ namespace CliWrap.Utils;
internal class ProcessEx(ProcessStartInfo startInfo) : IDisposable
{
private readonly Process _nativeProcess = new() { StartInfo = startInfo };
private readonly TaskCompletionSource<object?> _exitTcs =
new(TaskCreationOptions.RunContinuationsAsynchronously);

private readonly TaskCompletionSource<object?> _exitTcs = new(
TaskCreationOptions.RunContinuationsAsynchronously
);

public int Id => _nativeProcess.Id;

Expand Down

0 comments on commit c5e386c

Please sign in to comment.