Skip to content

Runfiles::create() throws error when parse_repo_mapping returns an error, instead of returning a default RepoMapping #2868

Closed
@felipeamp

Description

@felipeamp

Before #2847 was merged Runfiles::create() always called RepoMapping::new() when the Result of parse_repo_mapping was an error. Now, due to the question mark operator after the transpose()

let repo_mapping = raw_rlocation(&mode, "_repo_mapping")
.map(parse_repo_mapping)
.transpose()?
.unwrap_or_default();

the error is returned to the caller, instead of returning a default RepoMapping as before that PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions