MCPcopy Create free account
hub / github.com/apache/solr / parse_wizard_vars

Function parse_wizard_vars

dev-tools/scripts/releaseWizard.py:1804–1827  ·  view source on GitHub ↗

Parse --wizard-var markers from command stdout. Format: --wizard-var KEY=VALUE Returns a dict of extracted variables, with last value winning for duplicates.

(stdout_text)

Source from the content-addressed store, hash-verified

1802
1803
1804def parse_wizard_vars(stdout_text):
1805 """Parse --wizard-var markers from command stdout.
1806
1807 Format: --wizard-var KEY=VALUE
1808
1809 Returns a dict of extracted variables, with last value winning for duplicates.
1810 """
1811 variables = {}
1812 if not stdout_text:
1813 return variables
1814
1815 for line in stdout_text.splitlines():
1816 # Check if line starts with --wizard-var marker
1817 if line.startswith("--wizard-var "):
1818 # Extract the KEY=VALUE part
1819 var_part = line[len("--wizard-var "):].strip()
1820 if '=' in var_part:
1821 key, _, value = var_part.partition('=')
1822 key = key.strip()
1823 value = value.strip()
1824 if key: # Only store if key is not empty
1825 variables[key] = value
1826
1827 return variables
1828
1829
1830class Command(SecretYamlObject):

Callers 1

runMethod · 0.85

Calls 1

stripMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…