Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change * value to 'all' for improved bash compatibility ( Issue #5963 ) #6459

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions packages/cli/src/options/beaconNodeOptions/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import {defaultOptions, IBeaconNodeOptions, allNamespaces} from "@lodestar/beacon-node";
import {CliCommandOptions} from "../../util/index.js";
import { defaultOptions, IBeaconNodeOptions, allNamespaces } from "@lodestar/beacon-node";
import { CliCommandOptions } from "../../util/index.js";

clionachee marked this conversation as resolved.
Show resolved Hide resolved
const enabledAll = "*";
// Before: Original value was "*"
// The original value "*" is not very friendly to use in bash scripts as it's interpreted as a wildcard character.
// This change replaces "*" with "all" to improve compatibility with bash scripts.

// After: Changed to "all" for better compatibility with bash scripts
const enabledAll = "all";
nflaig marked this conversation as resolved.
Show resolved Hide resolved

clionachee marked this conversation as resolved.
Show resolved Hide resolved
export type ApiArgs = {
"api.maxGindicesInProof"?: number;
Expand Down Expand Up @@ -49,8 +54,8 @@ export const options: CliCommandOptions<ApiArgs> = {

"rest.namespace": {
type: "array",
choices: [...allNamespaces, enabledAll],
description: `Pick namespaces to expose for HTTP API. Set to '${enabledAll}' to enable all namespaces`,
choices: [...allNamespaces, enabledAll], // Added 'enabledAll' to the list of choices
description: `Pick namespaces to expose for HTTP API. Set to '${enabledAll}' to enable all namespaces`, // Updated description
defaultDescription: JSON.stringify(defaultOptions.api.rest.api),
nflaig marked this conversation as resolved.
Show resolved Hide resolved
clionachee marked this conversation as resolved.
Show resolved Hide resolved
group: "api",
coerce: (namespaces: string[]): string[] => {
Expand Down
Loading