lodestar icon indicating copy to clipboard operation
lodestar copied to clipboard

Replace `*` value with other more bash friendly value

Open nflaig opened this issue 2 years ago • 5 comments

Problem description

* is not very friendly to use in bash, it has to be quoted or else it will not be handled as a string but an operator instead, i.e. it will list all files of the directory.

There are currently a few CLI flags that accept * as a value

  • --rest.namespace
  • --rest.cors
  • --keymanager.cors

See Command Line Reference for an overview of all non-hidden flags.

Solution description

Replace * value with other more bash friendly value, for example the word all.

It has to be considered what value to use for cors as * has a special meaning in this context.

Additional context

No response

nflaig avatar Sep 18 '23 12:09 nflaig

Hi, may I know specifically which file or all the files? Is this issue still needing to be resolved?

clionachee avatar Feb 19 '24 15:02 clionachee

Hey, there are multiple cases but likely just wanna change this for --rest.namespace (see related PR https://github.com/ChainSafe/lodestar/pull/2809), and make sure it's backward compatible, i.e. * should still be handled if passed by the user.

https://github.com/ChainSafe/lodestar/blob/c7c99412c3bbe9a550811db7b812f5e6fc741357/packages/cli/src/options/beaconNodeOptions/api.ts#L4

It is probably also the only place where we would wanna change this, as for .cors CLI flags, the * has special meaning, and we can't change it to something like "all" there as it might be confusing.

nflaig avatar Feb 19 '24 16:02 nflaig

Thanks. I suppose if it's ok, I'll fork the Repo, make the changes in that file, replace the value & commit changes if no problem?

clionachee avatar Feb 20 '24 14:02 clionachee

Sure, go ahead, you can open a PR here after you are done with your changes. Happy to review :)

nflaig avatar Feb 20 '24 14:02 nflaig

Created PR #6459 thanks w/ love.

clionachee avatar Feb 20 '24 17:02 clionachee