diff options
| -rw-r--r-- | mu/mu-options.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mu/mu-options.cc b/mu/mu-options.cc index b9637b3..7c33b07 100644 --- a/mu/mu-options.cc +++ b/mu/mu-options.cc @@ -43,6 +43,7 @@ #include <unistd.h> #include <utils/mu-utils.hh> +#include <utils/mu-utils-file.hh> #include <utils/mu-error.hh> #include "utils/mu-test-utils.hh" #include "mu-options.hh" @@ -136,6 +137,19 @@ options_map(const IE& ie) return map; } + + +// transformers + + +// Expand the path using wordexp +static const std::function ExpandPath = [](std::string filepath)->std::string { + if (auto&& res{expand_path(filepath)}; !res) + throw CLI::ValidationError{res.error().what()}; + else + return filepath = std::move(res.value()); +}; + /* * common */ |
