Skip to content

Commit d183983

Browse files
isbldrsrid
andauthored
cli: add keep-project option (#99)
* add keep-tui option * --keep-project * Update CHANGELOG --------- Co-authored-by: Sridhar Ratnakumar <[email protected]>
1 parent 7546928 commit d183983

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Unreleased
44

55
- New features
6-
- #81, #84: Support for specifying process-compose global CLI options
6+
- #81, #84, #99: Support for specifying process-compose global CLI options
77
- **Breaking changes**:
88
- `preHook` and `postHook` are now inside `cli` module.
99
- Old options `httpServer` and `tui` were removed; users should use the new `cli` module to set all process-compose cli global options. TUI can be disabled using `cli.environment.PC_DISABLE_TUI = true;`

nix/process-compose/cli.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ in
3333
default = { };
3434
type = types.submodule {
3535
options = {
36+
keep-project = mkOption {
37+
type = types.bool;
38+
default = false;
39+
description = "Pass --keep-project to process-compose";
40+
};
3641
log-file = mkOption {
3742
type = types.nullOr types.str;
3843
default = null;
@@ -81,6 +86,7 @@ in
8186
description = "The final CLI arguments we will pass to process-compose binary.";
8287
default = let o = config.cli.options; in lib.escapeShellArgs (
8388
(lib.optionals (o.log-file != null) [ "--log-file" o.log-file ])
89+
++ (lib.optionals o.keep-project [ "--keep-project" ])
8490
++ (lib.optionals o.no-server [ "--no-server" ])
8591
++ (lib.optionals o.ordered-shutdown [ "--ordered-shutdown" ])
8692
++ (lib.optionals (o.port != null) [ "--port" "${builtins.toString o.port}" ])

0 commit comments

Comments
 (0)