Skip to content

Commit

Permalink
Fix runfiles creation for directory based runfiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Sep 18, 2024
1 parent 350d249 commit de81b81
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 @@ -141,6 +141,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 de81b81

Please sign in to comment.