mirror of
https://github.com/bahdotsh/wrkflw.git
synced 2026-05-18 05:05:35 +02:00
wrkflw@0.8.0 wrkflw-evaluator@0.8.0 wrkflw-executor@0.8.0 wrkflw-github@0.8.0 wrkflw-gitlab@0.8.0 wrkflw-logging@0.8.0 wrkflw-matrix@0.8.0 wrkflw-models@0.8.0 wrkflw-parser@0.8.0 wrkflw-runtime@0.8.0 wrkflw-secrets@0.8.0 wrkflw-trigger-filter@0.8.0 wrkflw-ui@0.8.0 wrkflw-utils@0.8.0 wrkflw-validators@0.8.0 wrkflw-watcher@0.8.0 Generated by cargo-workspaces
wrkflw-utils
Shared helpers used across crates.
- Workflow file detection (
.github/workflows/*.yml,.gitlab-ci.yml) - File-descriptor redirection utilities for silencing noisy subprocess output (Unix only; Windows support is limited)
Example
use std::path::Path;
use wrkflw_utils::{is_workflow_file, fd::with_stderr_to_null};
assert!(is_workflow_file(Path::new(".github/workflows/ci.yml")));
let value = with_stderr_to_null(|| {
eprintln!("this is hidden on Unix, visible on Windows");
42
}).unwrap();
assert_eq!(value, 42);