From ed16dbb0ed1d54d520bb3eebfc9285a0b23da122 Mon Sep 17 00:00:00 2001 From: Wouter van Kesteren Date: Sat, 16 May 2015 15:19:09 +0200 Subject: Fix cave-executables for cross MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3ab85c7e0c31a7792909e111e7bbe042fad589b7 Reviewed-on: https://galileo.mailstation.de/gerrit/1896 Reviewed-by: Kylie McClain Reviewed-by: Bo Ørsted Andresen --- src/clients/cave/executables_common.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/clients/cave/executables_common.cc b/src/clients/cave/executables_common.cc index 47891c16c..699397bd4 100644 --- a/src/clients/cave/executables_common.cc +++ b/src/clients/cave/executables_common.cc @@ -124,8 +124,13 @@ paludis::cave::executables_common( throw BeMoreSpecific(spec, entries); const std::string path(getenv_or_error("PATH")); + std::set raw_paths; + tokenise(path, ":", "", std::inserter(raw_paths, raw_paths.begin())); + std::set paths; - tokenise(path, ":", "", std::inserter(paths, paths.begin())); + for (const std::string& raw_path : raw_paths) + paths.insert(stringify(FSPath(raw_path).realpath_if_exists())); + ExecutablesDisplayer ed(paths, displayer); for (auto i(best ? entries->last() : entries->begin()), i_end(entries->end()) ; -- cgit v1.2.3