Files
wrkflw/crates/utils
bahdotsh 5161882989 fix(utils): remove unused imports to fix Windows clippy warnings
- Remove unused io::self import from common scope
- Remove unused std::fs::OpenOptions and std::io::Write from windows_impl
- Add std::io import to unix_impl to fix io::Error references
- Ensure clippy passes with -D warnings on all platforms
2025-08-27 15:39:52 +05:30
..

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);