OCaml: Add simulate (dry run) configuration option
This commit is contained in:
parent
1f16024c9e
commit
9e9a9566db
5 changed files with 42 additions and 25 deletions
|
|
@ -17,11 +17,17 @@ type os = Unknown | FreeBSD | Void | Alpine
|
|||
type host = { os : os; name : string }
|
||||
|
||||
type default_bool = Default | true | false
|
||||
type configuration_key = SuCommand | SuCommandQuoted | Interactive | Unknown
|
||||
type configuration_key =
|
||||
| SuCommand
|
||||
| SuCommandQuoted
|
||||
| Interactive
|
||||
| Simulate
|
||||
| Unknown
|
||||
type main = {
|
||||
su_command : string list;
|
||||
su_command_quoted: default_bool;
|
||||
interactive: bool
|
||||
interactive: bool;
|
||||
simulate: bool;
|
||||
}
|
||||
type configuration = { main : main; }
|
||||
type input = { configuration: configuration; }
|
||||
|
|
@ -53,6 +59,7 @@ let origin : schema = {
|
|||
su_command = [ "su"; "-c" ];
|
||||
su_command_quoted = Default;
|
||||
interactive = true;
|
||||
simulate = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -78,6 +85,7 @@ let string_of_key key =
|
|||
| SuCommand -> "su_command"
|
||||
| SuCommandQuoted -> "su_command_quoted"
|
||||
| Interactive -> "interactive"
|
||||
| Simulate -> "simulate"
|
||||
| Unknown -> "<unknown key>"
|
||||
|
||||
let string_of_default_bool (b: default_bool): string =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue