Skip to main content

rewrite_artifact_pattern

Function rewrite_artifact_pattern 

Source
pub fn rewrite_artifact_pattern(
    pattern: &str,
    original_target_dir: &str,
    effective_target_dir: &str,
) -> ArtifactPatternRewrite
Expand description

Rewrite pattern from original_target_dir to effective_target_dir.

A pattern is rewritten only when it begins with the original target dir on a path-segment boundary (so target rewrites but target_foo does not). Both absolute (/proj/target/...) and relative (target/...) forms are handled; the caller passes matching forms. Patterns that do not reference the target dir pass through unchanged.