--- name: assert_command_exists kind: function lang: bash domain: shell version: "1.0.0" purity: impure signature: "assert_command_exists(command_name: string) -> void" description: "Verifica que un comando está disponible en el PATH. Sale con exit code 1 si no se encuentra, con mensaje a stderr." tags: [assert, command, exists, validation, shell, bash, path] uses_functions: [] uses_types: [] returns: [] returns_optional: false error_type: "error_go_core" imports: [] params: - name: command_name desc: "nombre del comando a verificar en PATH" output: "sin salida en éxito" tested: false tests: [] test_file_path: "" file_path: "bash/functions/shell/assert_command_exists.sh" --- ## Ejemplo ```bash source functions/shell/assert_command_exists.sh assert_command_exists docker assert_command_exists jq ``` ## Notas Usa `command -v` (POSIX) con redirección `&>/dev/null` para suprimir output. No produce nada a stdout en caso de éxito. Output limpio: void en éxito, mensaje a stderr en fallo.