Skip to content

Commit

Permalink
Fix branch used by cli (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 authored Sep 10, 2024
1 parent 935213f commit 5f20705
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/create-effect-app/src/GitHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@ export const make = Effect.gen(function*() {
)

const downloadExample = (config: ExampleConfig) =>
HttpClientRequest.get("/Effect-TS/examples/tar.gz/chore/enhance-templates").pipe(
HttpClientRequest.get("/Effect-TS/examples/tar.gz/main").pipe(
codeloadClient,
HttpClientResponse.stream,
Stream.run(NodeSink.fromWritable(() =>
Tar.extract({
cwd: config.projectName,
strip: 2 + config.projectType.example.split("/").length,
filter: (path) => path.includes(`examples-chore-enhance-templates/examples/${config.projectType.example}`)
filter: (path) => path.includes(`examples-main/examples/${config.projectType.example}`)
}), (cause) => new TarExtractionError({ cause, directory: config.projectName })))
)

const downloadTemplate = (config: TemplateConfig) =>
HttpClientRequest.get("/Effect-TS/examples/tar.gz/chore/enhance-templates").pipe(
HttpClientRequest.get("/Effect-TS/examples/tar.gz/main").pipe(
codeloadClient,
HttpClientResponse.stream,
Stream.run(NodeSink.fromWritable(() =>
Tar.extract({
cwd: config.projectName,
strip: 2 + config.projectType.template.split("/").length,
filter: (path) => path.includes(`examples-chore-enhance-templates/templates/${config.projectType.template}`)
filter: (path) => path.includes(`examples-main/templates/${config.projectType.template}`)
}), (cause) => new TarExtractionError({ cause, directory: config.projectName })))
)

Expand Down
3 changes: 0 additions & 3 deletions packages/create-effect-app/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import * as NodeHttpClient from "@effect/platform-node/NodeHttpClient"
import * as NodeRuntime from "@effect/platform-node/NodeRuntime"
import * as Ansi from "@effect/printer-ansi/Ansi"
import * as AnsiDoc from "@effect/printer-ansi/AnsiDoc"
import * as Cause from "effect/Cause"
import * as Console from "effect/Console"
import * as Effect from "effect/Effect"
import * as Layer from "effect/Layer"
import * as Logger from "effect/Logger"
Expand Down Expand Up @@ -41,7 +39,6 @@ cli(process.argv).pipe(
)
}),
Effect.orDie,
Effect.tapErrorCause((cause) => Console.log(Cause.pretty(cause))),
Effect.provide(MainLive),
NodeRuntime.runMain({
disablePrettyLogger: true,
Expand Down

0 comments on commit 5f20705

Please sign in to comment.