def go2

cswap-bend-cli@0.1.0.0 · daemon/entry.bend:95

import cswap-bend-cli@0.1.0.0/daemon/entry.bend as Entry
import Base
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase
import cswap-bend-cli@0.1.0.0/swlive.bend as L
import cswap-bend-cli@0.1.0.0/daemon/config.bend as Cfg

95# A `--profile` that names nothing is a usage error.
96def go2(+bad: Maybe<&2, String>, +ctx: SBase.Ctx, +f: Cfg.Flags, +state_dir: String, +opts: L.Opts, +version: String, +text: String, +over: Maybe<&2, String>) -> Act.of(U32):
97  match bad:
98    case Some{n}:
99      Act.fail(U32, 2, "cswap auto: error: unknown profile '" ++ n ++ "'; `cswap profile list` shows the profiles")
100    case None{}:
101      go3(ctx, f, state_dir, opts, version, text, over)

Uses (10)

Used by (1)