Skip to content

Commit be89b32

Browse files
omarsyclaude
andauthored
feat(greffer-cli): greffer update self-update engine (v1) (#76)
* feat(cli): update-engine compose helpers (pull, image-ref rewrite, /readyz probe, digests) First increment of the `greffer update` v1 engine (design: greffon docs/features/ greffer-self-update, merged greffon#165). Adds the compose.py primitives the engine builds on, each unit-tested (no Docker needed): - compose_pull: explicit pull of node images (incl. profile-gated ones) before recreate, since `up` reuses the cached image when only the tag changed in-file. - set_image_tag / set_image_refs: rewrite every greffon/* image line (tagged or digest-pinned) atomically; set_image_tag returns prior refs for rollback. - data_volume_is_named: pre-flight that /data is a named volume (so identity survives recreate), distinguishing a named source from a bind path; no YAML dep. - exec_in_greffer_readyz: probe /readyz inside the container with the resolved X-GREFFON-TOKEN, returning the {id,status,reasons} body for the health gate. - image_id / container_image_id: verify the recreate advanced to the pulled target and capture the running image for rollback. 105 CLI tests pass. Next: update.py engine + `greffer update` command + strings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(cli): `greffer update` engine + command (resolve, pre-flight, pull, recreate, /readyz gate, rollback) Increment 2 of the v1 update engine (design greffon#165). The 5-step host-side update: - update.py: HTTPS-only manifest fetch + target resolution (--to > manifest latest); no_rollback_from gate (reachable-but-silent manifest = rollback-safe; unreachable = needs --confirm-no-rollback); pre-flight /data named-volume check; snapshot via set_image_tag (prior refs) -> compose_pull (all node images incl the profile-gated sidecar) -> compose_up; health gate (/healthz live -> /readyz ready + id match + version-applied + all active services up; restart-count fail-fast); rollback restores prior refs and recreates from local cache (exit 1 rolled-back / 2 rollback-failed). Idempotent by running-image digest. --check is read-only. - compose.py: service_container_id + exec_greffer_version helpers. - main.py: `greffer update [--to] [--check] [--timeout] [--config-dir] [--confirm-no-rollback]`. - strings.py: operator-facing update strings (marketing review pending at PR time). - tests: 14 update tests (pure logic + engine paths via a FakeDocker harness, no Docker). Full CLI suite: 119 passed. Next: manager-side update_available/latest_version (Feature 1), cli-e2e, PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(greffer-cli): harden update engine after adversarial review Address findings from a pre-PR adversarial review of the `greffer update` v1 engine: - mode resolution: when env.env lacks GREFFER_MODE (hand-edited / legacy install), detect the mode from the running node (tunnel-sidecar present => tunnel) instead of assuming a static default, so the health gate waits on the right service set. Explicit GREFFER_MODE still wins. - pre-flight: refuse the update when GREFFER_ID is missing from env.env, since the post-recreate gate's id-match check would otherwise be a silent no-op (updating blind). - health gate: tolerate degraded reasons via set membership (TOLERABLE_DEGRADED_REASONS) rather than exact-list equality, so a registration_pending paired with any other reason still fails. - compose: enforce the full 64-char sha256 length in the image-line regex; simplify the old-ref extraction (drop a misleading `and`/dead fallback); close the raw fd if os.fdopen raises in _atomic_write. Tests: add the 5 missing health-gate failure outcomes (timeout, fatal, wrong-id, degraded-other, crash-loop), both rollback-failure paths (rollback compose up fails / rollback never healthy => exit 2), mode auto-detection, and the no-GREFFER_ID pre-flight refusal. 129 passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(greffer-cli): make compose-arg assertions OS-portable The Windows CI build failed: three update-engine tests hardcoded the POSIX string "/tmp/c.yml" and asserted it verbatim in the docker args, but str(Path("/tmp/c.yml")) is "\tmp\c.yml" on Windows. The product code is correct (it passes str(compose_file), right per-OS); only the test assertions baked in a POSIX path. Compare against str(Path(...)) instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(greffer-cli): make /data named-volume preflight separator-agnostic data_volume_is_named distinguished a named volume from a bind mount with a POSIX-only test (`"/" not in src`). On Windows a relative, backslash- separated bind source onto /data (e.g. `data\sub:/data`) contains no "/" and so was misclassified as a named volume, letting the identity- preservation preflight pass and `greffer update` recreate a bind-backed /data, dropping the persisted token / TLS key / migration ledger. Use a positive allowlist matching Docker's own volume-name grammar ([A-Za-z0-9][A-Za-z0-9_.-]*): separator-agnostic, so the classification is identical on every host the CLI ships to. Add POSIX and Windows relative-bind regression cases. Found by a cross-platform portability audit of the update diff. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(greffer-cli): validate update tag, disarm on interrupt, lock, pull all images Second review round on the update engine found, and this fixes: - SECURITY (tag injection -> RCE): the update target tag was written into docker-compose.yml with no grammar validation, and the default source is a network-fetched manifest. A manifest `latest` carrying a newline + YAML (e.g. a `command:` key) injected into the compose file, then `compose up` executed it. Add is_valid_image_tag (Docker tag grammar, fullmatch) and enforce it at every entry: fetch_manifest coerces non-string fields to None, resolve_target drops an invalid tag, `update --to` is validated at the CLI boundary, and set_image_tag raises rather than write an invalid tag. Restores the HLD's "a tampered manifest can name only a tag in the known repo, never an arbitrary image" invariant. - INTERRUPT SAFETY: a Ctrl-C / SIGTERM after the retag but before the gate passed left the compose file pinned to an un-gated target with no rollback, so a later bare `docker compose up` would recreate into it. Wrap rewrite->pull->recreate->gate in try/finally + a SIGTERM handler that restores the prior refs unless the gate passed. - CONCURRENCY: serialize the mutating path on a host flock (~/.greffer/.update.lock) so two concurrent runs can't race the rewrite / rollback-baseline capture; a second run refuses cleanly. POSIX flock (auto-releases on death); degrades to unlocked where fcntl is absent. - CONTRACT: pull/validate ALL three node images (incl. the profile-gated tunnel-sidecar in proxy mode), since set_image_tag retags all three; a bad sidecar tag is now caught at update time, not on a later proxy->tunnel switch. Recreate and the health gate stay mode-scoped. Tests: +26 — tag-grammar + injection refusal, manifest coercion/malformed, parse_readyz defensive shapes, listed-pair no-rollback gate, tunnel-profile recreate, partial-services-up timeout->rollback, single-restart tolerated, Ctrl-C disarm, lock-held refusal, idempotent file-untouched. 157 passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(greffer-cli): SIGTERM-on-success exit code + manifest message; pin new paths Third review round, addressing its findings: - SIGTERM on a *succeeded* update exited 143: the handler raised SystemExit(143) unconditionally, so a kill in the window after the gate passed but before the handler is restored reported failure for a confirmed success. The handler now exits 0 once gate_passed (a v2 wrapper keying on the exit code must not misread success). - Diagnostics: a reachable manifest whose `latest` is missing / non-string / an invalid tag now prints a distinct "manifest reached but no usable latest" message (UPDATE_BAD_MANIFEST) instead of the misleading "manifest unreachable" text. Tests pinning behavior the prior commit left unguarded: - compose_pull is called with profile="tunnel" + all three services in proxy mode (a revert to mode-scoped pull would now fail — this is the security-motivated sidecar-validation line). - the SIGTERM path: a bare kill mid-recreate disarms the compose file and exits 143, and the prior handler is restored. - the CLI --to boundary rejects an invalid tag with exit 2 before the engine runs. - the bad-manifest message branch. 161 passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(greffer-cli): refuse https->http downgrade when fetching the manifest The first-hop `url.startswith("https://")` check did not bind redirects: the default urllib opener transparently follows a 302 to http://, so a MITM / misconfigured CDN could downgrade the manifest channel to plaintext and serve a forged manifest — suppressing the no_rollback_from safety confirmation (the manifest's only "proceed without --confirm" signal) and, in auto-latest mode, dictating the target tag. Fetch through a dedicated opener whose redirect handler re-checks the scheme on every hop and raises on any non-https target (a URLError subclass, so the existing except turns it into a fail-closed None -> treated as unreachable -> forces --confirm-no-rollback). Also bound the read (_MAX_MANIFEST_BYTES) so a hostile endpoint can't stream an unbounded body into the process. Tests: the redirect handler refuses an http downgrade and allows an https redirect; an oversized body yields None. 163 passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5afe7f0 commit be89b32

7 files changed

Lines changed: 1880 additions & 0 deletions

File tree

‎cli/greffer_cli/compose.py‎

Lines changed: 293 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
from __future__ import annotations
1010

1111
import json
12+
import os
13+
import re
1214
import shlex
1315
import subprocess
16+
import tempfile
1417
from dataclasses import dataclass
1518
from pathlib import Path
1619

@@ -256,6 +259,296 @@ def docker_inspect_restart_count(container_id: str) -> int:
256259
return 0
257260

258261

262+
# --- Update engine: pull, image-ref rewrite, readiness, digests -----
263+
264+
def compose_pull(
265+
compose_file: Path, *, profile: str | None = None,
266+
services: list[str] | None = None,
267+
) -> CommandResult:
268+
"""``docker compose pull`` the node images before a recreate.
269+
270+
A plain ``up`` reuses the locally-cached image when only the tag
271+
changed in the compose file, so an explicit pull is required to
272+
actually fetch the target. Pass explicit ``services`` to pull (and
273+
thereby validate) even profile-gated ones (the ``tunnel-sidecar`` in
274+
proxy mode): an update rewrites its image line too, so a missing or
275+
bad target tag must be caught here rather than silently leaving an
276+
inactive service pointed at an unpullable image.
277+
"""
278+
args = ["docker", "compose", "-f", str(compose_file)]
279+
if profile:
280+
args.extend(["--profile", profile])
281+
args.append("pull")
282+
if services:
283+
args.extend(services)
284+
return _run(args, timeout=300)
285+
286+
287+
# An ``image:`` line for one of our published node images. Matches a
288+
# bare repo, a tagged ref, or a digest-pinned ref (a prior rollback may
289+
# have left ``greffon/greffer@sha256:...``). The compose template keeps
290+
# each image on its own line with no trailing inline comment, so a
291+
# line-oriented rewrite is safe and avoids a YAML round-trip that would
292+
# reorder keys / strip comments.
293+
_IMAGE_LINE_RE = re.compile(
294+
r"^(?P<indent>\s*image:\s*)"
295+
r"(?P<repo>greffon/[A-Za-z0-9._-]+)"
296+
r"(?::[^\s@]+|@sha256:[0-9a-fA-F]{64})?"
297+
r"(?P<trail>\s*)$"
298+
)
299+
300+
301+
# Docker image-tag grammar: up to 128 chars, leading char alphanumeric or
302+
# "_", then alphanumeric / "_" / "." / "-". An update target is validated
303+
# against this BEFORE it is written into a compose ``image:`` line, so a
304+
# tampered version manifest (or a bad --to) can name only a tag in the known
305+
# repo, never inject a newline / extra YAML key / a different image that
306+
# `docker compose up` would then execute. (Signature / digest verification
307+
# of the image itself is a separate, later trust gate.)
308+
_IMAGE_TAG_RE = re.compile(r"[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}")
309+
310+
311+
def is_valid_image_tag(tag: object) -> bool:
312+
"""True iff ``tag`` is a syntactically valid Docker image tag.
313+
314+
Uses ``fullmatch`` so the whole string must be a valid tag, so a trailing
315+
newline (``"latest\\n"``) can't slip past a ``$`` anchor and add a blank
316+
line / break the rewrite.
317+
"""
318+
return isinstance(tag, str) and _IMAGE_TAG_RE.fullmatch(tag) is not None
319+
320+
321+
def _rewrite_image_lines(text: str, resolve) -> tuple[str, dict[str, str]]:
322+
"""Rewrite every ``greffon/*`` image line via ``resolve(repo, old_ref)``.
323+
324+
``resolve`` returns the new full ref (e.g. ``greffon/greffer:0.3.4``
325+
or ``greffon/greffer@sha256:...``) or ``None`` to leave the line
326+
unchanged. Returns ``(new_text, old_refs)`` where ``old_refs`` maps
327+
repo -> the full ref that was there before (for rollback).
328+
"""
329+
out: list[str] = []
330+
old_refs: dict[str, str] = {}
331+
for line in text.splitlines(keepends=True):
332+
nl = "\n" if line.endswith("\n") else ""
333+
m = _IMAGE_LINE_RE.match(line.rstrip("\n"))
334+
if not m:
335+
out.append(line)
336+
continue
337+
repo = m.group("repo")
338+
# The regex guarantees the repo is present, so the ref after
339+
# "image:" is always non-empty, so extract it directly.
340+
old_refs[repo] = line.strip()[len("image:"):].strip()
341+
new_ref = resolve(repo, old_refs[repo])
342+
if new_ref is None:
343+
out.append(line)
344+
else:
345+
out.append(f"{m.group('indent')}{new_ref}{nl}")
346+
return "".join(out), old_refs
347+
348+
349+
def _atomic_write(path: Path, text: str) -> None:
350+
fd, tmp = tempfile.mkstemp(dir=str(path.parent), prefix=f".{path.name}.tmp.")
351+
tmp_path = Path(tmp)
352+
try:
353+
# If fdopen raises it does NOT take ownership of the descriptor,
354+
# so close the raw fd ourselves to avoid leaking it. On success
355+
# the `with` owns and closes it.
356+
try:
357+
f = os.fdopen(fd, "w", encoding="utf-8")
358+
except Exception:
359+
os.close(fd)
360+
raise
361+
with f:
362+
f.write(text)
363+
os.replace(tmp_path, path)
364+
except Exception:
365+
try:
366+
tmp_path.unlink()
367+
except FileNotFoundError:
368+
pass
369+
raise
370+
371+
372+
def set_image_tag(compose_file: Path, target: str) -> dict[str, str]:
373+
"""Rewrite **every** ``greffon/*`` image line to ``<repo>:<target>``.
374+
375+
Covers greffer + greffer-nginx + the profile-gated tunnel-sidecar:
376+
the set is derived from the file, not a hard-coded count, so a node
377+
update retags the whole node whatever the mode renders. Returns the
378+
map of repo -> prior full ref, so a rollback can restore the exact
379+
refs that were there before (`set_image_refs`).
380+
"""
381+
if not is_valid_image_tag(target):
382+
# Defense in depth: callers validate the target, but never write an
383+
# unvalidated tag into the compose file. An injected newline / YAML
384+
# key would be executed by `docker compose up`.
385+
raise ValueError(f"refusing to write invalid image tag: {target!r}")
386+
text = compose_file.read_text(encoding="utf-8")
387+
new_text, old_refs = _rewrite_image_lines(
388+
text, lambda repo, _old: f"{repo}:{target}",
389+
)
390+
_atomic_write(compose_file, new_text)
391+
return old_refs
392+
393+
394+
def set_image_refs(compose_file: Path, refs: dict[str, str]) -> None:
395+
"""Rewrite ``greffon/*`` image lines to the given full refs.
396+
397+
``refs`` maps repo -> full image ref (tag or digest). Lines whose
398+
repo is absent from ``refs`` are left untouched. Used by rollback to
399+
restore captured prior refs, pinning active services to their
400+
captured running digest where a moved tag would otherwise resolve
401+
to the bad image.
402+
"""
403+
text = compose_file.read_text(encoding="utf-8")
404+
new_text, _ = _rewrite_image_lines(
405+
text, lambda repo, _old: refs.get(repo),
406+
)
407+
_atomic_write(compose_file, new_text)
408+
409+
410+
# A compose short-syntax volume mount onto /data: ``- <source>:/data[:opts]``.
411+
_DATA_MOUNT_RE = re.compile(r"^\s*-\s*(?P<src>[^\s:]+):/data(?::[a-zA-Z,]+)?\s*$")
412+
413+
414+
def data_volume_is_named(compose_file: Path) -> bool:
415+
"""Pre-flight: is /data backed by a NAMED volume (not a bind / nothing)?
416+
417+
A named volume (``greffon-data:/data``) survives a container recreate,
418+
which is what keeps the persisted token / TLS key / migration ledger
419+
and so the greffer's identity. A bind mount (``/host/path:/data``) or
420+
no /data mount at all fails this check: an update that recreates the
421+
container would otherwise drop identity and `409` on re-register.
422+
423+
The discriminator without a YAML dependency: a named-volume source is
424+
a bare name (no path separator, not relative/absolute/home), whereas a
425+
bind-mount source is a path. The CLI always renders the short syntax,
426+
so a line match is sufficient and avoids a YAML round-trip.
427+
"""
428+
try:
429+
text = compose_file.read_text(encoding="utf-8")
430+
except OSError:
431+
return False
432+
for line in text.splitlines():
433+
m = _DATA_MOUNT_RE.match(line)
434+
if m:
435+
src = m.group("src")
436+
# A Docker volume name is a bare token [A-Za-z0-9][A-Za-z0-9_.-]*;
437+
# anything with a path separator (POSIX "/" or Windows "\") or a
438+
# relative/home prefix is a bind mount. A positive allowlist is
439+
# separator-agnostic, so the classification is identical on every
440+
# host the CLI ships to (Linux/macOS/Windows), not just POSIX.
441+
return re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9_.-]*", src) is not None
442+
return False
443+
444+
445+
def exec_in_greffer_readyz(compose_file: Path) -> CommandResult:
446+
"""Probe ``/readyz`` from inside the greffer container, returning its body.
447+
448+
Unlike ``exec_in_greffer_healthz`` (which only maps a 200 to exit 0),
449+
this returns the parsed-able JSON body on stdout so the caller can
450+
read ``id`` / ``status`` / ``reasons``. ``/readyz`` is authed, so the
451+
probe resolves ``X-GREFFON-TOKEN`` the way the service does (env
452+
``GREFFER_TOKEN`` then the persisted ``/data/.greffer-token``) and
453+
sends it. The token never leaves the container: the CLI only reads
454+
the response body. Exit 0 on any HTTP response (200 or 503 — both
455+
carry a JSON body the caller inspects); non-zero on a connection
456+
error so the caller keeps polling.
457+
"""
458+
probe = (
459+
"import sys, os, urllib.request, urllib.error\n"
460+
"tok = os.environ.get('GREFFER_TOKEN')\n"
461+
"if not tok:\n"
462+
" try:\n"
463+
" tok = open('/data/.greffer-token', encoding='utf-8').read().strip()\n"
464+
" except OSError:\n"
465+
" tok = ''\n"
466+
"req = urllib.request.Request(\n"
467+
" 'http://localhost:8000/readyz',\n"
468+
" headers={'X-GREFFON-TOKEN': tok},\n"
469+
")\n"
470+
"try:\n"
471+
" r = urllib.request.urlopen(req, timeout=5)\n"
472+
" sys.stdout.write(r.read().decode()); sys.exit(0)\n"
473+
"except urllib.error.HTTPError as e:\n"
474+
" sys.stdout.write(e.read().decode()); sys.exit(0)\n"
475+
"except urllib.error.URLError:\n"
476+
" sys.exit(1)\n"
477+
)
478+
return _run(
479+
[
480+
"docker", "compose", "-f", str(compose_file),
481+
"exec", "-T", "greffer",
482+
"python", "-c", probe,
483+
],
484+
timeout=15,
485+
)
486+
487+
488+
def image_id(ref: str) -> str | None:
489+
"""Return the content image ID (``sha256:...``) of an image ref, or None.
490+
491+
Used to (a) verify the recreate actually advanced to the pulled
492+
target — the running greffer's image ID must equal the target ref's
493+
image ID — and (b) detect a no-op recreate (image ID unchanged from
494+
the captured prior).
495+
"""
496+
result = _run(
497+
["docker", "image", "inspect", ref, "--format", "{{.Id}}"], timeout=10,
498+
)
499+
if not result.ok:
500+
return None
501+
out = result.stdout.strip()
502+
return out or None
503+
504+
505+
def service_container_id(compose_file: Path, service: str) -> str | None:
506+
"""Return the running container id for a compose service, or None."""
507+
cid = _run(
508+
["docker", "compose", "-f", str(compose_file), "ps", "-q", service],
509+
timeout=10,
510+
)
511+
if not cid.ok:
512+
return None
513+
out = cid.stdout.strip()
514+
return out or None
515+
516+
517+
def container_image_id(compose_file: Path, service: str) -> str | None:
518+
"""Return the image ID the named compose service's container is running."""
519+
cid = service_container_id(compose_file, service)
520+
if not cid:
521+
return None
522+
result = _run(
523+
["docker", "inspect", cid, "--format", "{{.Image}}"], timeout=10,
524+
)
525+
if not result.ok:
526+
return None
527+
out = result.stdout.strip()
528+
return out or None
529+
530+
531+
def exec_greffer_version(compose_file: Path) -> str | None:
532+
"""Read the running greffer's ``app.__version__`` via ``docker exec``.
533+
534+
This is the value the greffer reports to the manager as
535+
``Greffer.version`` (see app/settings.py), so it is what the update's
536+
"did the version actually advance" check and the ``no_rollback_from``
537+
current->target pair compare against.
538+
"""
539+
result = _run(
540+
[
541+
"docker", "compose", "-f", str(compose_file), "exec", "-T", "greffer",
542+
"python", "-c", "import app; print(app.__version__)",
543+
],
544+
timeout=10,
545+
)
546+
if not result.ok:
547+
return None
548+
out = result.stdout.strip()
549+
return out or None
550+
551+
259552
def host_port_free(port: int) -> bool:
260553
"""Doctor: is the given host port available for nginx to bind?"""
261554
import socket

‎cli/greffer_cli/main.py‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from . import status as status_mod
1818
from . import strings as strings_mod
1919
from . import up as up_mod
20+
from . import update as update_mod
2021

2122

2223
app = typer.Typer(
@@ -203,6 +204,53 @@ def up(
203204
raise typer.Exit(code=rc)
204205

205206

207+
@app.command()
208+
def update(
209+
to: Optional[str] = typer.Option(
210+
None, "--to", help="Target version tag (default: latest from the manifest)",
211+
),
212+
check: bool = typer.Option(
213+
False, "--check", help="Read-only: print current/target/available, change nothing",
214+
),
215+
timeout: int = typer.Option(
216+
600, "--timeout", help="Health-gate timeout in seconds (default 10 min)",
217+
),
218+
config_dir: Optional[str] = typer.Option(
219+
None, "--config-dir", help="Override the default ~/.greffer/ location",
220+
),
221+
confirm_no_rollback: bool = typer.Option(
222+
False, "--confirm-no-rollback",
223+
help="Proceed even if rollback safety for this version pair can't be confirmed",
224+
),
225+
) -> None:
226+
"""Update the greffer node to a newer published image.
227+
228+
Pulls the target, recreates the node, health-gates on /readyz, and
229+
rolls back to the previous version on any failure.
230+
"""
231+
# Validate --to at the boundary so a bad tag fails fast with a clear
232+
# message (the engine also rejects it, but here we can be specific).
233+
if to is not None and not compose_mod.is_valid_image_tag(to):
234+
typer.echo(strings_mod.UPDATE_BAD_TARGET.format(target=to), err=True)
235+
raise typer.Exit(code=2)
236+
237+
cfg = paths.resolve_config_dir(config_dir)
238+
if not paths.docker_compose_yml_path(cfg).exists():
239+
typer.echo(
240+
"no greffer install found here — run `greffer up` first.", err=True,
241+
)
242+
raise typer.Exit(code=update_mod.EXIT_PREFLIGHT_REFUSED)
243+
rc = update_mod.run_update(
244+
cfg,
245+
target=to,
246+
timeout=float(timeout),
247+
confirm_no_rollback=confirm_no_rollback,
248+
check_only=check,
249+
)
250+
if rc != update_mod.EXIT_OK:
251+
raise typer.Exit(code=rc)
252+
253+
206254
@app.command()
207255
def status(
208256
config_dir: Optional[str] = typer.Option(

0 commit comments

Comments
 (0)