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.
- Add
CliCommand.Kill(bool entireProcessTree)
method. - Add
CliCommand.Process
property.
- Add
CliCommandResultValidationRules
enumeration with the flag values:None
,ZeroExitCode
,NoError
,ZeroExitCodeAndNoError
. - Add
public CliCommandResultValidationRules ResultValidationRules { get; set; } = CliCommandResultValidationRules.ZeroExitCode
property toProgramCli
.
- Change default
CliCommandResult
validation inExecute
andExecuteAsync
methods to checkExitCode == 0
instead ofHasError == false
. - Add exit code to
CliCommandException
message.
- Add
UseCmdForWindowsAndShForOthers()
static method toOSDependentShellCliCommandFactory
.
- Make
ShellCliCommandFactory
abstract and remove its obsolete behavior. - Set default value of
ProgramCli.DefaultShellCliCommandFactory
toOSDependentShellCliCommandFactory.UseCmdForWindowsAndShForOthers()
.
- Add
CmdShellCliCommandFactory
class. - Add
UnixShellCliCommandFactory
class. - Add
BashShellCliCommandFactory
class. - Add
ShShellCliCommandFactory
class. - Add
SudoShellCliCommandFactory
class. - Add
OSDependentShellCliCommandFactory
class. - Add
public static ICliCommandFactory DefaultShellCliCommandFactory { get; set; }
property toProgramCli
. - Add
public ICliCommandFactory CliCommandFactory { get; set; }
property toProgramCli
. - Add
WithCliCommandFactory(ICliCommandFactory cliCommandFactory)
method toProgramCli
andProgramCli<TCli>
.
- Improve
ShellCliCommandFactory
to be stick to a specific shell and can be used as a base class for a specific shell CLI command factory.
- Add
string WorkingDirectory
property toCliCommandResult
.
- Change the format of
CliCommandException
message. Add "Working directory" to message.
- Add
HasError
property toCliCommandResult
. - Add
WithWorkingDirectory(string)
method toProgramCli
andProgramCli<TCli>
. - Add
ExecuteRawAsync(string)
method toProgramCli
.
- Change access modifier of
ProgramCli.ExecuteRaw(string)
method fromprotected
topublic
.
- Fix
bash
commands execution
Initial version release.