Skip to content

Commit

Permalink
only use cli built-in error logging (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart authored Feb 5, 2024
1 parent b40d225 commit f861455
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/slimy-humans-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/codemod": patch
---

only use cli built-in error logging
5 changes: 2 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as Args from "@effect/cli/Args"
import * as Command from "@effect/cli/Command"
import * as Options from "@effect/cli/Options"
import * as NodeContext from "@effect/platform-node/NodeContext"
import { runMain } from "@effect/platform-node/Runtime"
import * as Console from "effect/Console"
import * as Effect from "effect/Effect"
import * as ReadonlyArray from "effect/ReadonlyArray"
Expand All @@ -31,7 +30,7 @@ const codemod = Args.choice(
Args.withDescription("The code modification to run"),
)

const run = Command.make("effect-codemod", {
const run = Command.make("codemod", {
codemod,
paths: Args.text({ name: "paths" }).pipe(
Args.repeated,
Expand Down Expand Up @@ -70,5 +69,5 @@ const run = Command.make("effect-codemod", {
run(process.argv).pipe(
Effect.provide(NodeContext.layer),
Effect.tapDefect(Console.error),
runMain,
Effect.runFork,
)

0 comments on commit f861455

Please sign in to comment.