aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/common-eval-args.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-06-23 13:51:25 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-07-09 23:22:22 -0400
commitbe518e73ae331ac2f46e6b3a0ffdfeead26e3186 (patch)
treeeef4c5fa909176ff4e9e49ce732a8104c314af4f /src/libcmd/common-eval-args.cc
parent87dcd090470ed6e56a2744cbe1490d2cf235d5c0 (diff)
Clean up `SearchPath`
- Better types - Own header / C++ file pair - Test factored out methods - Pass parsed thing around more than strings Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Diffstat (limited to 'src/libcmd/common-eval-args.cc')
-rw-r--r--src/libcmd/common-eval-args.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcmd/common-eval-args.cc b/src/libcmd/common-eval-args.cc
index 7f97364a1..3df2c71a5 100644
--- a/src/libcmd/common-eval-args.cc
+++ b/src/libcmd/common-eval-args.cc
@@ -105,7 +105,9 @@ MixEvalArgs::MixEvalArgs()
)",
.category = category,
.labels = {"path"},
- .handler = {[&](std::string s) { searchPath.push_back(s); }}
+ .handler = {[&](std::string s) {
+ searchPath.elements.emplace_back(SearchPath::Elem::parse(s));
+ }}
});
addFlag({