MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / extractEnvVars

Function extractEnvVars

src/utils/bash/parser.ts:175–187  ·  view source on GitHub ↗
(commandNode: Node | null)

Source from the content-addressed store, hash-verified

173}
174
175function extractEnvVars(commandNode: Node | null): string[] {
176 if (!commandNode || commandNode.type !== 'command') return []
177
178 const envVars: string[] = []
179 for (const child of commandNode.children) {
180 if (child.type === 'variable_assignment') {
181 envVars.push(child.text)
182 } else if (child.type === 'command_name' || child.type === 'word') {
183 break
184 }
185 }
186 return envVars
187}
188
189export function extractCommandArguments(commandNode: Node): string[] {
190 // Declaration commands

Callers 1

parseCommandFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected