Skip to content

Commit

Permalink
Fix runfiles creation for directory based runfiles. (#2883)
Browse files Browse the repository at this point in the history
closes #2868
  • Loading branch information
UebelAndre authored Sep 18, 2024
1 parent 51c9d3b commit 3daf96e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/runfiles/runfiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ impl Runfiles {
};

let repo_mapping = raw_rlocation(&mode, "_repo_mapping")
// This is the only place directory based runfiles might do file IO for a runfile. In the
// event that a `_repo_mapping` file does not exist, a default map should be created. Otherwise
// if the file is known to exist, parse it and raise errors for users should parsing fail.
.filter(|f| f.exists())
.map(parse_repo_mapping)
.transpose()?
.unwrap_or_default();
Expand Down

0 comments on commit 3daf96e

Please sign in to comment.