MCPcopy Create free account
hub / github.com/freecodexyz/free-code / hasDirectoryChange

Function hasDirectoryChange

src/utils/powershell/parser.ts:1578–1588  ·  view source on GitHub ↗
(parsed: ParsedPowerShellCommand)

Source from the content-addressed store, hash-verified

1576 */
1577// exported for testing
1578export function hasDirectoryChange(parsed: ParsedPowerShellCommand): boolean {
1579 for (const cmdName of getAllCommandNames(parsed)) {
1580 if (
1581 DIRECTORY_CHANGE_CMDLETS.has(cmdName) ||
1582 DIRECTORY_CHANGE_ALIASES.has(cmdName)
1583 ) {
1584 return true
1585 }
1586 }
1587 return false
1588}
1589
1590/**
1591 * 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