diff options
author | Sascha Roloff <sascha.roloff@huawei.com> | 2023-06-28 17:27:48 +0200 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2023-06-28 19:06:25 +0200 |
commit | 1a0c23c087666f528fee105f079374a2707f1a64 (patch) | |
tree | e4b815653baa3f56331e399ff2c8e57a86bc21db /src | |
parent | 4e7d2c467d384503fedb5e6e36052cd56d69666e (diff) | |
download | justbuild-1a0c23c087666f528fee105f079374a2707f1a64.tar.gz |
Fix json to filepath conversion in main
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/main/main.cpp | 4 | ||||
-rw-r--r-- | src/other_tools/just_mr/utils.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 5589b0e0..4b8804d6 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -664,7 +664,7 @@ auto ParseRoot(std::string const& repo, repo); std::exit(kExitFailure); } - auto path = std::filesystem::path{root[1]}; + auto path = std::filesystem::path{root[1].get<std::string>()}; return {FileRoot{path}, std::move(path)}; } if (root[0] == FileRoot::kGitTreeMarker) { @@ -699,7 +699,7 @@ auto ParseRoot(std::string const& repo, repo); std::exit(kExitFailure); } - auto path = std::filesystem::path{root[1]}; + auto path = std::filesystem::path{root[1].get<std::string>()}; return {FileRoot{path, /*ignore_special=*/true}, std::move(path)}; } if (root[0] == FileRoot::kGitTreeIgnoreSpecialMarker) { diff --git a/src/other_tools/just_mr/utils.cpp b/src/other_tools/just_mr/utils.cpp index 94a1f53b..92563824 100644 --- a/src/other_tools/just_mr/utils.cpp +++ b/src/other_tools/just_mr/utils.cpp @@ -23,8 +23,9 @@ namespace JustMR::Utils { auto GetGitRoot(JustMR::PathsPtr const& just_mr_paths, std::string const& repo_url) noexcept -> std::filesystem::path { if (just_mr_paths->git_checkout_locations.contains(repo_url)) { - return std::filesystem::absolute(ToNormalPath(std::filesystem::path( - just_mr_paths->git_checkout_locations[repo_url]))); + return std::filesystem::absolute(ToNormalPath(std::filesystem::path{ + just_mr_paths->git_checkout_locations[repo_url] + .get<std::string>()})); } auto repo_url_as_path = std::filesystem::absolute( ToNormalPath(std::filesystem::path(repo_url))); |