[ 
https://issues.apache.org/jira/browse/HDDS-13796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18029974#comment-18029974
 ] 

Rishabh Patel commented on HDDS-13796:
--------------------------------------

This is correct it is a shell quirk. The `=` can be skipped if one is already 
aware of the behavior. 
However, this may not always be the case. The problem is when the command fails 
or returns silently with no explanation. 

Picocli sets spaces and `=` as the default separator. 
This is problematic as the command help description or any other documentation 
does not call out the difference in behavior.

Knowing this,
 # Do we update all commands to only accept spaces as a separator?
 # Continue to allow the `=` separator but call out the behavior w.r.t globbing?

> Globbing does not expand the parameters
> ---------------------------------------
>
>                 Key: HDDS-13796
>                 URL: https://issues.apache.org/jira/browse/HDDS-13796
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Rishabh Patel
>            Assignee: Rishabh Patel
>            Priority: Major
>
> There are several places in the Ozone CLI which accept a local file path as a 
> parameter. 
> Consider the ozone debug ldb command which needs a path to a RocksDB instance.
> When the path is provided in the form {{{}`--db=fullPath`{}}}, the command 
> works
> {code:java}
> bash-5.1$ ozone debug ldb 
> --db=/data/hdds/hdds/CID-ac134998-b544-4bfb-be77-50e0f17ce2ad/DS-208d40b1-45f6-4200-aabc-a231ec5a2a04/container.db
>  ls
> default
> delete_txns
> finalize_blocks
> block_data
> metadata
> last_chunk_info
> {code}
> When the path is provided after an {{`=`}} sign,  {{{}`--db=path*`{}}}, the 
> command does *not* work.
> {code:java}
> bash-5.1$ ozone debug ldb --db=/data/hdds/hdds/CID-*/DS-*/container.db 
> ls{code}
> When the path is provided after a space,  {{{}`--db path*`{}}}, the command 
> works.
> {code:java}
> bash-5.1$ ozone debug ldb --db /data/hdds/hdds/CID-*/DS-*/container.db ls
> default
> delete_txns
> finalize_blocks
> block_data
> metadata
> last_chunk_info{code}
> [~erose] pointed out that the shell path does not expand when it is provided 
> as a parameter after the `=` sign. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to