mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Improve install_paths handling for relative paths. (#4331)
Because install_paths is not presently validated, and it's resolved after the `SetWorkingDirForBazel` call, if a relative path is used with bazel then it would fail silently. This starts making the driver share install path errors, and starts changing how `//toolchain` launches `carbon`. Note the implementation is still brittle and will break with symlinks. That's something I plan to address as part of busyboxing.
This commit is contained in:
@@ -118,7 +118,7 @@ TEST_F(InstallPathsTest, BinaryRunfiles) {
|
||||
}
|
||||
|
||||
TEST_F(InstallPathsTest, Errors) {
|
||||
auto paths = InstallPaths::Make("foo/bar/baz");
|
||||
auto paths = InstallPaths::Make("/foo/bar/baz");
|
||||
EXPECT_THAT(paths.error(), Optional(HasSubstr("foo/bar/baz")));
|
||||
EXPECT_THAT(paths.prefix(), Eq(""));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user