bf1efb2099
- Migration 007: repo_url on apps table + analysis table with FTS5 - Analysis struct, parser, CRUD, validation, hash computation - Selective purge: remote-only apps/analysis preserved across fn index - CLI: fn app list/clone/pull, fn analysis list/clone/pull - search/show/list now include analysis results - Apps removed from git tracking (content lives in Gitea repos) - .gitkeep for apps/ and analysis/ dirs - Bash functions: jupyter analysis pipeline, shell utilities - Browser domain: CDP functions moved from infra to browser Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.3 KiB
1.3 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| exit_with_status | function | bash | shell | 1.0.0 | pure | exit_with_status(total_steps: int, ok_steps: int, failed_steps: int) -> int | Calcula el exit code estandar (0=success, 1=failure, 2=partial) a partir de contadores de pasos. Si failed_steps=0 imprime 0 y sale con 0. Si ok_steps=0 imprime 1 y sale con 1. Si hay ambos imprime 2 y sale con 2. |
|
false | false | bash/functions/shell/exit_with_status.sh |
Ejemplo
source bash/functions/shell/exit_with_status.sh
exit_with_status 5 5 0 # stdout: 0, exit code: 0
exit_with_status 5 0 5 # stdout: 1, exit code: 1
exit_with_status 5 3 2 # stdout: 2, exit code: 2
Notas
Funcion pura: no realiza I/O de sistema, no modifica estado global, no lee variables de entorno. El argumento total_steps se recibe para completitud semantica pero la logica solo depende de ok_steps y failed_steps. El valor se imprime a stdout ademas de usarse como exit code, de modo que el caller puede capturarlo con $(exit_with_status ...) o evaluar directamente con exit_with_status ... ; echo $?.