MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / hasDirectoryChange

Function hasDirectoryChange

source code/utils/powershell/parser.ts:1580–1590  ·  view source on GitHub ↗
(parsed: ParsedPowerShellCommand)

Source from the content-addressed store, hash-verified

1578 */
1579// exported for testing
1580export function hasDirectoryChange(parsed: ParsedPowerShellCommand): boolean {
1581 for (const cmdName of getAllCommandNames(parsed)) {
1582 if (
1583 DIRECTORY_CHANGE_CMDLETS.has(cmdName) ||
1584 DIRECTORY_CHANGE_ALIASES.has(cmdName)
1585 ) {
1586 return true
1587 }
1588 }
1589 return false
1590}
1591
1592/**
1593 * Check if the command is a single simple command (no pipes, no semicolons, no operators).

Callers

nothing calls this directly

Calls 2

getAllCommandNamesFunction · 0.85
hasMethod · 0.45

Tested by

no test coverage detected