def plan.go

ezx@1.11.0.0 · src/init/plan.bend:248

import ezx@1.11.0.0/src/init/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/lock/plan.bend as P

248# the plan, once the name and entry are settled. A ledger on disk holds
249# dependencies, tools and a `bin` that a fresh one would lose, so `ez init`
250# writes over none of it, whatever the file holds, and refuses.
251def plan.go(
252  led: Maybe<&2, String>,
253  +name: String,
254  +at: String,
255  +desc: String,
256  ignore: Maybe<&2, String>,
257  main: Maybe<&2, String>,
258  lib: Maybe<&2, String>
259) -> P.Plan:
260  match led:
261    case Some{_s}:
262      P.Plan{[], P.Refused{"ez: " ++ toml() ++
263        " already exists; ez init writes a new project and leaves it alone"}}
264    case None{}:
265      plan.new(fits(name, at, desc), name, at, desc, ignore, main, lib)

Uses (9)

Used by (1)