Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MockToolsConfig now enforces relative path args.
In MockToolsConfig, all rootDirectory.getRelative calls except the one in the ctor (and in getPath) are replaced with a call to getPath, because this standardizes all path lookups. The ctor's call is legitimate and remains, because it converts an absolute path string to a Path object and there's no other way to do that. Also, MockToolsConfig.getPath now validates that its argument is a relative path, because that's what the function expects (according to the variable name) and because that's how we can support real (not in-memory) filesystems. Finally, fix call sites that passed absolute paths (e.g. create("/local_config_xcode/WORKSPACE")) to pass a relative path instead, again because that's how we can use a real filesystem. (All paths will be made relative to the FileSystem's root directory.) RELNOTES: none PiperOrigin-RevId: 294155732
- Loading branch information
1 parent
9ec7181
commit e1d2e2a
Showing
9 changed files
with
117 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.