All Versions
39
Latest Version
Avg Release Cycle
54 days
Latest Release
-
Changelog History
Page 1
Changelog History
Page 1
-
v3.5 Changes
- β Added
LoadUserProfile
option toCredentials
and the correspondingLoadUserProfile()
method toCredentialsBuilder
. Setting this option totrue
will load the user profile when starting the process. Only supported on Windows. - π Improved wording in some exception messages.
- β Added
-
v3.4.4 Changes
- π Improved cancellation handling in all execution models by attaching the triggered
CancellationToken
to producedOperationCanceledException
s. - π Fixed an issue where using
PipeSource.FromFile(...)
with a non-existing file did not throw an exception.
- π Improved cancellation handling in all execution models by attaching the triggered
-
v3.4.3 Changes
- β Added
PipeSource.Create(...)
andPipeTarget.Create(...)
factory methods that can be used to create anonymous instances ofPipeSource
andPipeTarget
. This approach can be convenient if you need to implement a customPipeSource
orPipeTarget
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 andPipeTarget.ToStream(Stream.Null)
.
- β Added
-
v3.4.2 Changes
- π Improved process execution performance by not setting
CreateNoWindow
tofalse
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 thePure
attribute. The compiler will now produce a warning if you call any of these methods without using the returned value.
- π Improved process execution performance by not setting
-
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 invalidCommandTask
, 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 returnedCommandTask
had invalidProcessId
of0
. It also caused event stream execution models (Observe()
andListenAsync()
) to incorrectly yieldStartedCommandEvent
even if the process was not able to actually start.
- π Fixed an issue where calling
-
v3.4 Changes
- β Added automatic resolving of script files on Windows (i.e.
.bat
and.cmd
files). Previously, if you didCli.Wrap("foo")
, the underlying implementation ofSystem.Diagnostic.Process
would try to findfoo
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 findfoo.cmd
orfoo.bat
even if they existed on the PATH. This was an issue withCli.Wrap("npm")
andCli.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.
- β Added automatic resolving of script files on Windows (i.e.
-
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 callingCli.Wrap("foo").WithEnvironmentVariables(env => ...)
. - β Added an overload of pipe operator for configuring a byte array as a pipe source.
- β Added an overload of
-
v3.3.2 Changes
- β Added the ability to remove an inherited environment variable by setting its value to
null
. (Thanks @Ville Penttinen)
- β Added the ability to remove an inherited environment variable by setting its value to
-
v3.3.1 Changes
- β Added
ExitCode
andCommand
properties toCommandExecutionException
. These properties can be inspected to retrieve the exit code returned by the process and the command that triggered the exception. (Thanks @Philip)
- β Added
-
v3.3 Changes
- β Added
PipeSource.FromFile(...)
andPipeTarget.ToFile(...)
as convenience shorthands for creating pipes that work withFileStream
instances. - β Added overloads for
ArgumentsBuilder.Add(...)
that takeIFormatProvider
instead ofCultureInfo
. In a future major version, the overloads that takeCultureInfo
will be removed. - π Improved performance of
PipeSource.Null
andPipeTarget.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 callConfigureAwait(...)
onCliWrap.CommandTask<T>
manually or to disableConfigureAwait.Fody
altogether. - β Added