Skip to content

Commit b96d8ad

Browse files
remove alias for --daemon/--no-daemon (#9084)
1 parent 3f9c869 commit b96d8ad

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

crates/turborepo-lib/src/cli/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -857,15 +857,15 @@ pub struct RunArgs {
857857

858858
// clap does not have negation flags such as --daemon and --no-daemon
859859
// so we need to use a group to enforce that only one of them is set.
860-
// we set the long name as [no-]daemon with an alias of daemon such
861-
// that we can merge the help text together for both flags
862860
// -----------------------
863-
/// Force turbo to either use or not use the local daemon. If unset
861+
/// Force turbo to use the local daemon. If unset
864862
/// turbo will use the default detection logic.
865-
#[clap(long = "(no-)daemon", alias = "daemon", group = "daemon-group")]
863+
#[clap(long, group = "daemon-group")]
866864
pub daemon: bool,
867865

868-
#[clap(long, group = "daemon-group", hide = true)]
866+
/// Force turbo to not use the local daemon. If unset
867+
/// turbo will use the default detection logic.
868+
#[clap(long, group = "daemon-group")]
869869
pub no_daemon: bool,
870870

871871
/// File to write turbo's performance profile output into.

turborepo-tests/integration/tests/conflicting-flags.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Setup
22
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh
33
$ ${TURBO} run build --daemon --no-daemon
4-
ERROR the argument '--\(no-\)daemon' cannot be used with '--no-daemon' (re)
4+
ERROR the argument '--daemon' cannot be used with '--no-daemon'
55

6-
Usage: turbo(\.exe)? run --\(no-\)daemon (re)
6+
Usage: turbo(\.exe)? run --daemon (re)
77

88
For more information, try '--help'.
99

turborepo-tests/integration/tests/no-args.t

+4-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ Make sure exit code is 2 when no args are passed
7070
Generate a graph of the task execution and output to a file when a filename is specified (.svg, .png, .jpg, .pdf, .json, .html, .mermaid, .dot). Outputs dot graph to stdout when if no filename is provided
7171
--no-cache
7272
Avoid saving task results to the cache. Useful for development/watch tasks
73-
--(no-)daemon
74-
Force turbo to either use or not use the local daemon. If unset turbo will use the default detection logic
73+
--daemon
74+
Force turbo to use the local daemon. If unset turbo will use the default detection logic
75+
--no-daemon
76+
Force turbo to not use the local daemon. If unset turbo will use the default detection logic
7577
--profile <PROFILE>
7678
File to write turbo's performance profile output into. You can load the file up in chrome://tracing to see which parts of your build were slow
7779
--anon-profile <ANON_PROFILE>

turborepo-tests/integration/tests/turbo-help.t

+9-4
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ Test help flag
7070
Generate a graph of the task execution and output to a file when a filename is specified (.svg, .png, .jpg, .pdf, .json, .html, .mermaid, .dot). Outputs dot graph to stdout when if no filename is provided
7171
--no-cache
7272
Avoid saving task results to the cache. Useful for development/watch tasks
73-
--(no-)daemon
74-
Force turbo to either use or not use the local daemon. If unset turbo will use the default detection logic
73+
--daemon
74+
Force turbo to use the local daemon. If unset turbo will use the default detection logic
75+
--no-daemon
76+
Force turbo to not use the local daemon. If unset turbo will use the default detection logic
7577
--profile <PROFILE>
7678
File to write turbo's performance profile output into. You can load the file up in chrome://tracing to see which parts of your build were slow
7779
--anon-profile <ANON_PROFILE>
@@ -215,8 +217,11 @@ Test help flag
215217
--no-cache
216218
Avoid saving task results to the cache. Useful for development/watch tasks
217219

218-
--(no-)daemon
219-
Force turbo to either use or not use the local daemon. If unset turbo will use the default detection logic
220+
--daemon
221+
Force turbo to use the local daemon. If unset turbo will use the default detection logic
222+
223+
--no-daemon
224+
Force turbo to not use the local daemon. If unset turbo will use the default detection logic
220225

221226
--profile <PROFILE>
222227
File to write turbo's performance profile output into. You can load the file up in chrome://tracing to see which parts of your build were slow

0 commit comments

Comments
 (0)