gianm commented on code in PR #13365:
URL: https://github.com/apache/druid/pull/13365#discussion_r1044140490
##########
examples/bin/supervise:
##########
@@ -179,13 +195,23 @@ usage() unless GetOptions(
'vardir|d=s',
'kill-timeout|t=i',
'chdir=s',
- 'svlogd:s'
+ 'svlogd:s',
+ 'command=s@'
);
-usage() unless $opt{'conf'} && $opt{'vardir'};
+usage() unless (($opt{'conf'} || @{$opt{'command'}}) && $opt{'vardir'});
Review Comment:
Ah, this should be:
```
usage() unless (($opt{'command'} && @{$opt{'command'}}) || $opt{'conf'}) &&
$opt{'vardir'}
```
breaking down `($opt{'command'} && @{$opt{'command'}})`:
- `$opt{'command'}` means "there is some value at `$opt{'command'}`
- we expect this to be an arrayref, so, `@{$opt{'command'}}` means "the
arrayref at `$opt{'command'}` is nonempty"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]