All Versions
39
Latest Version
3.5
Avg Release Cycle
54 days
Latest Release
-

Changelog History
Page 1

  • v3.5 Changes

    • βž• Added LoadUserProfile option to Credentials and the corresponding LoadUserProfile() method to CredentialsBuilder. Setting this option to true will load the user profile when starting the process. Only supported on Windows.
    • πŸ‘Œ Improved wording in some exception messages.
  • v3.4.4 Changes

    • πŸ‘Œ Improved cancellation handling in all execution models by attaching the triggered CancellationToken to produced OperationCanceledExceptions.
    • πŸ›  Fixed an issue where using PipeSource.FromFile(...) with a non-existing file did not throw an exception.
  • v3.4.3 Changes

    • βž• Added PipeSource.Create(...) and PipeTarget.Create(...) factory methods that can be used to create anonymous instances of PipeSource and PipeTarget. This approach can be convenient if you need to implement a custom PipeSource or PipeTarget but don't want to define a new class. (Thanks @CΓ©dric Luthi)
    • πŸ“š Updated inline documentation for PipeTarget.Null with additional information clarifying the difference in behavior between that target and PipeTarget.ToStream(Stream.Null).
  • v3.4.2 Changes

    • πŸ‘Œ Improved process execution performance by not setting CreateNoWindow to false when running inside a console application. This change reduces performance overhead by up to 60% in some cases. (Thanks @Retik)
    • πŸ‘Œ Improved overall performance by making use of IAsyncDisposable on streams where it is available.
    • πŸ”§ Marked configuration methods on Command with the Pure attribute. The compiler will now produce a warning if you call any of these methods without using the returned value.
  • v3.4.1 Changes

    • πŸ›  Fixed an issue where calling Cli.Wrap("non-existing-target").ExecuteAsync() on a target that doesn't exist resulted in an invalid CommandTask, due to the fact that the associated exception was thrown in an asynchronous context that was not observed prior to that point. This had a few consequences, such as the fact that the returned CommandTask had invalid ProcessId of 0. It also caused event stream execution models (Observe() and ListenAsync()) to incorrectly yield StartedCommandEvent even if the process was not able to actually start.
  • v3.4 Changes

    • βž• Added automatic resolving of script files on Windows (i.e. .bat and .cmd files). Previously, if you did Cli.Wrap("foo"), the underlying implementation of System.Diagnostic.Process would try to find foo in several locations, including directories listed in the PATH environment variable. On Windows, however, this only worked for .exe files, meaning that it wouldn't find foo.cmd or foo.bat even if they existed on the PATH. This was an issue with Cli.Wrap("npm") and Cli.Wrap("az") because those CLI tools are implemented as .cmd scripts on Windows. CliWrap now attempts to resolves those paths itself. (Thanks @AliReZa Sabouri)
    • πŸ‘Œ Improved exception thrown when the underlying process fails to start. It now contains the target file path, which can be helpful to identify the exact command that failed. (Thanks @Mohamed Hassan)

    ⚠ ⚠ Warning: the next major version of CliWrap (4.0) will drop support for legacy .NET Framework, .NET Standard, and .NET Core (prior to rebranding). Going forward, the library will only target .NET 5 and higher. If you have any questions, please comment on this issue.

  • v3.3.3 Changes

    • βž• Added an overload of EnvironmentVariablesBuilder.Set(...) that takes a dictionary parameter. This lets you set multiple environment variables at once by passing a dictionary when calling Cli.Wrap("foo").WithEnvironmentVariables(env => ...).
    • βž• Added an overload of pipe operator for configuring a byte array as a pipe source.
  • v3.3.2 Changes

    • βž• Added the ability to remove an inherited environment variable by setting its value to null. (Thanks @Ville Penttinen)
  • v3.3.1 Changes

    • βž• Added ExitCode and Command properties to CommandExecutionException. These properties can be inspected to retrieve the exit code returned by the process and the command that triggered the exception. (Thanks @Philip)
  • v3.3 Changes

    • βž• Added PipeSource.FromFile(...) and PipeTarget.ToFile(...) as convenience shorthands for creating pipes that work with FileStream instances.
    • βž• Added overloads for ArgumentsBuilder.Add(...) that take IFormatProvider instead of CultureInfo. In a future major version, the overloads that take CultureInfo will be removed.
    • πŸ‘Œ Improved performance of PipeSource.Null and PipeTarget.Null.
    • Signed assembly. (Thanks @lazyboy1)

    πŸ”§ Known incompatibility issue: Using CliWrap together with ConfigureAwait.Fody, in code compiled with .NET 5.0 SDK or higher, results in a NullReferenceException at run time. The recommended workaround is to call ConfigureAwait(...) on CliWrap.CommandTask<T> manually or to disable ConfigureAwait.Fody altogether.