MCPcopy Create free account
hub / github.com/Effect-TS/effect / applyPrefix

Function applyPrefix

packages/effect/src/unstable/process/ChildProcess.ts:756–769  ·  view source on GitHub ↗
(self: Command, prefixSpec: PrefixSpec)

Source from the content-addressed store, hash-verified

754}
755
756const applyPrefix = (self: Command, prefixSpec: PrefixSpec): Command => {
757 switch (self._tag) {
758 case "StandardCommand": {
759 return makeStandardCommand(
760 prefixSpec.command,
761 [...prefixSpec.args, self.command, ...self.args],
762 self.options
763 )
764 }
765 case "PipedCommand": {
766 return makePipedCommand(applyPrefix(self.left, prefixSpec), self.right, self.options)
767 }
768 }
769}
770
771/**
772 * Sets the current working directory for a command.

Callers 1

prefixFunction · 0.85

Calls 2

makeStandardCommandFunction · 0.85
makePipedCommandFunction · 0.85

Tested by

no test coverage detected