Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
fix for multiple handler transforms (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart authored Dec 13, 2023
1 parent 57a57a5 commit ff2d006
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lemon-masks-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/cli": patch
---

fix for multiple handler transforms
5 changes: 4 additions & 1 deletion src/internal/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ const makeDerive = <Name extends string, R, E, A>(
const command = Object.create(Prototype)
command.descriptor = options.descriptor ?? self.descriptor
command.handler = options.handler ?? self.handler
command.transform = options.transform ?? self.transform
command.transform = options.transform
? ((effect: Effect.Effect<R, E, void>, opts: A) =>
options.transform!(self.transform(effect, opts), opts))
: self.transform
command.tag = self.tag
return command
}
Expand Down

0 comments on commit ff2d006

Please sign in to comment.