mirror of
https://github.com/bahdotsh/wrkflw.git
synced 2025-12-16 03:37:49 +01:00
docs(utils): update README to document cross-platform fd behavior
- Document Unix vs Windows fd redirection limitations - Update example to reflect platform-specific behavior - Clarify that stderr suppression is Unix-only
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Shared helpers used across crates.
|
||||
|
||||
- Workflow file detection (`.github/workflows/*.yml`, `.gitlab-ci.yml`)
|
||||
- File-descriptor redirection utilities for silencing noisy subprocess output
|
||||
- File-descriptor redirection utilities for silencing noisy subprocess output (Unix only; Windows support is limited)
|
||||
|
||||
### Example
|
||||
|
||||
@@ -14,7 +14,7 @@ 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");
|
||||
eprintln!("this is hidden on Unix, visible on Windows");
|
||||
42
|
||||
}).unwrap();
|
||||
assert_eq!(value, 42);
|
||||
|
||||
Reference in New Issue
Block a user