(self: Command, prefixSpec: PrefixSpec)
| 754 | } |
| 755 | |
| 756 | const 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. |
no test coverage detected