@@ -49,7 +49,12 @@ pub struct SelfManagedDebugMode {
49
49
#[ clap( long, default_value = "true" , action = clap:: ArgAction :: Set ) ]
50
50
dump_k8s : bool ,
51
51
/// A list of namespaces to dump.
52
- #[ clap( long = "k8s-namespace" , required_if_eq( "dump_k8s" , "true" ) , action = clap:: ArgAction :: Append ) ]
52
+ #[ clap(
53
+ long = "k8s-namespace" ,
54
+ required_unless_present = "dump_k8s" ,
55
+ required_if_eq( "dump_k8s" , "true" ) ,
56
+ action = clap:: ArgAction :: Append
57
+ ) ]
53
58
k8s_namespaces : Vec < String > ,
54
59
/// The kubernetes context to use.
55
60
#[ clap( long, env = "KUBERNETES_CONTEXT" ) ]
@@ -69,8 +74,7 @@ pub struct SelfManagedDebugMode {
69
74
port_forward_local_port : i32 ,
70
75
/// The URL of the Materialize SQL connection used to dump the system catalog.
71
76
/// An example URL is `postgres://[email protected] :6875/materialize?sslmode=disable`.
72
- /// By default, we will create use the connection URL based on `port_forward_local_address` and `port_forward_local_port`.
73
- /// and port_forward_local_port.
77
+ /// By default, we will create a connection URL based on `port_forward_local_address` and `port_forward_local_port`.
74
78
// TODO(debug_tool3): Allow users to specify the pgconfig via separate variables
75
79
#[ clap(
76
80
long,
@@ -86,7 +90,11 @@ pub struct EmulatorDebugMode {
86
90
#[ clap( long, default_value = "true" , action = clap:: ArgAction :: Set ) ]
87
91
dump_docker : bool ,
88
92
/// The ID of the docker container to dump.
89
- #[ clap( long, required_if_eq( "dump_docker" , "true" ) ) ]
93
+ #[ clap(
94
+ long,
95
+ required_unless_present = "dump_docker" ,
96
+ required_if_eq( "dump_docker" , "true" )
97
+ ) ]
90
98
docker_container_id : Option < String > ,
91
99
/// The URL of the Materialize SQL connection used to dump the system catalog.
92
100
/// An example URL is `postgres://[email protected] :6875/materialize?sslmode=disable`.
@@ -115,7 +123,7 @@ pub struct Args {
115
123
#[ clap( subcommand) ]
116
124
debug_mode : DebugMode ,
117
125
/// If true, the tool will dump the system catalog in Materialize.
118
- #[ clap( long, default_value = "true" , action = clap:: ArgAction :: Set ) ]
126
+ #[ clap( long, default_value = "true" , action = clap:: ArgAction :: Set , global = true ) ]
119
127
dump_system_catalog : bool ,
120
128
}
121
129
0 commit comments