All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
4.0.0 - 2026-08-31
- Add
public Task<CliCommandResult> WaitForExitAsync(CancellationToken)method toCliCommand. - Add
public CliCommandResult? Result { get; }property toCliCommand. - Add enum
CliCommandKillOnDisposewith values:None,OnlyProcess,EntireProcessTree. - Add
public CliCommandKillOnDispose KillOnDispose { get; set; } = CliCommandKillOnDispose.EntireProcessTreeproperty toCliCommand. - Add
public Task<CliCommandResult> ExecuteAsync(CancellationToken)method toProgramCli. - Add
public Task<CliCommandResult> ExecuteRawAsync(CancellationToken)method toProgramCli. - Add
public string MergedOutput { get; }property toCliCommandResultandCliCommand.
- Change package target frameworks from .NET Standard 2.0 to .NET 8.0 and .NET Framework 4.6.2.
- Enable nullable reference types.
- Update
WaitForExitandKillmethods ofCliCommandto check whether a process has exited. - Remove internal
Disposemethod call in the end ofWaitForExitandKillmethods ofCliCommand. - Add
CancellationTokenparameter toExecuteAsyncandExecuteRawAsyncmethods ofProgramCli.
- Remove obsolete
CliCommandException.Createstatic method.
2.2.0 - 2022-07-29
- Add
CliCommand.Kill(bool entireProcessTree)method. - Add
CliCommand.Processproperty.
2.1.0 - 2022-07-21
- Add
CliCommandResultValidationRulesenumeration with the flag values:None,ZeroExitCode,NoError,ZeroExitCodeAndNoError. - Add
public CliCommandResultValidationRules ResultValidationRules { get; set; } = CliCommandResultValidationRules.ZeroExitCodeproperty toProgramCli.
- Change default
CliCommandResultvalidation inExecuteandExecuteAsyncmethods to checkExitCode == 0instead ofHasError == false. - Add exit code to
CliCommandExceptionmessage.
- Add
UseCmdForWindowsAndShForOthers()static method toOSDependentShellCliCommandFactory.
- Make
ShellCliCommandFactoryabstract and remove its obsolete behavior. - Set default value of
ProgramCli.DefaultShellCliCommandFactorytoOSDependentShellCliCommandFactory.UseCmdForWindowsAndShForOthers().
- Add
CmdShellCliCommandFactoryclass. - Add
UnixShellCliCommandFactoryclass. - Add
BashShellCliCommandFactoryclass. - Add
ShShellCliCommandFactoryclass. - Add
SudoShellCliCommandFactoryclass. - Add
OSDependentShellCliCommandFactoryclass. - Add
public static ICliCommandFactory DefaultShellCliCommandFactory { get; set; }property toProgramCli. - Add
public ICliCommandFactory CliCommandFactory { get; set; }property toProgramCli. - Add
WithCliCommandFactory(ICliCommandFactory cliCommandFactory)method toProgramCliandProgramCli<TCli>.
- Improve
ShellCliCommandFactoryto be stick to a specific shell and can be used as a base class for a specific shell CLI command factory.
- Add
string WorkingDirectoryproperty toCliCommandResult.
- Change the format of
CliCommandExceptionmessage. Add "Working directory" to message.
- Add
HasErrorproperty toCliCommandResult. - Add
WithWorkingDirectory(string)method toProgramCliandProgramCli<TCli>. - Add
ExecuteRawAsync(string)method toProgramCli.
- Change access modifier of
ProgramCli.ExecuteRaw(string)method fromprotectedtopublic.
- Fix
bashcommands execution
Initial version release.
