Skip to content

Commit

Permalink
CLI: Print unknown argument errors (#2252)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccntrq authored Mar 5, 2024
1 parent e3ff789 commit 89b5d1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/selfish-kangaroos-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/cli": minor
---

Print unknown argument errors
2 changes: 1 addition & 1 deletion packages/cli/src/internal/cliApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const run = dual<
),
onNonEmpty: (head) => {
const error = InternalHelpDoc.p(`Received unknown argument: '${head}'`)
return Effect.fail(InternalValidationError.invalidValue(error))
return Effect.zipRight(printDocs(error), Effect.fail(InternalValidationError.invalidValue(error)))
}
})
}
Expand Down

0 comments on commit 89b5d1c

Please sign in to comment.